| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| ; REQUIRES: asserts | ||
| ; REQUIRES: x86-registered-target | ||
|
|
||
| ;; Tests that we use correct accelerator table when processing nested TUs. | ||
| ;; Assert is not triggered. | ||
| ;; File1 | ||
| ;; struct Foo { | ||
| ;; char f; | ||
| ;; }; | ||
| ;; struct Foo2 { | ||
| ;; char f; | ||
| ;; Foo f1; | ||
| ;; }; | ||
| ;; void fooFunc() { | ||
| ;; Foo2 global2; | ||
| ;; } | ||
| ;; clang++ <file>.cpp -O0 -g2 -fdebug-types-section -gpubnames -S -emit-llvm -o <file>.ll | ||
|
|
||
| ; RUN: llc -O0 -dwarf-version=5 -generate-type-units -filetype=obj < %s -o %t.o | ||
| ; RUN: llvm-readelf --sections %t.o | FileCheck --check-prefix=OBJ %s | ||
|
|
||
| ; OBJ: debug_names | ||
|
|
||
| ; ModuleID = 'main.cpp' | ||
| source_filename = "main.cpp" | ||
| target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" | ||
| target triple = "x86_64-unknown-linux-gnu" | ||
|
|
||
| %struct.Foo2 = type { i8, %struct.Foo } | ||
| %struct.Foo = type { i8 } | ||
|
|
||
| ; Function Attrs: mustprogress noinline nounwind optnone uwtable | ||
| define dso_local void @_Z7fooFuncv() #0 !dbg !10 { | ||
| entry: | ||
| %global2 = alloca %struct.Foo2, align 1 | ||
| call void @llvm.dbg.declare(metadata ptr %global2, metadata !14, metadata !DIExpression()), !dbg !23 | ||
| ret void, !dbg !24 | ||
| } | ||
|
|
||
| ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) | ||
| declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 | ||
|
|
||
| attributes #0 = { mustprogress noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } | ||
| attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } | ||
|
|
||
| !llvm.dbg.cu = !{!0} | ||
| !llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8} | ||
| !llvm.ident = !{!9} | ||
|
|
||
| !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 18.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false) | ||
| !1 = !DIFile(filename: "main.cpp", directory: "/smallMultipleTUs", checksumkind: CSK_MD5, checksum: "70bff4d50322126f3d8ca4178afad376") | ||
| !2 = !{i32 7, !"Dwarf Version", i32 5} | ||
| !3 = !{i32 2, !"Debug Info Version", i32 3} | ||
| !4 = !{i32 1, !"wchar_size", i32 4} | ||
| !5 = !{i32 8, !"PIC Level", i32 2} | ||
| !6 = !{i32 7, !"PIE Level", i32 2} | ||
| !7 = !{i32 7, !"uwtable", i32 2} | ||
| !8 = !{i32 7, !"frame-pointer", i32 2} | ||
| !9 = !{!"clang version 18.0.0git"} | ||
| !10 = distinct !DISubprogram(name: "fooFunc", linkageName: "_Z7fooFuncv", scope: !1, file: !1, line: 9, type: !11, scopeLine: 9, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !13) | ||
| !11 = !DISubroutineType(types: !12) | ||
| !12 = !{null} | ||
| !13 = !{} | ||
| !14 = !DILocalVariable(name: "global2", scope: !10, file: !1, line: 10, type: !15) | ||
| !15 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo2", file: !1, line: 4, size: 16, flags: DIFlagTypePassByValue, elements: !16, identifier: "_ZTS4Foo2") | ||
| !16 = !{!17, !19} | ||
| !17 = !DIDerivedType(tag: DW_TAG_member, name: "f", scope: !15, file: !1, line: 5, baseType: !18, size: 8) | ||
| !18 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) | ||
| !19 = !DIDerivedType(tag: DW_TAG_member, name: "f1", scope: !15, file: !1, line: 6, baseType: !20, size: 8, offset: 8) | ||
| !20 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !1, line: 1, size: 8, flags: DIFlagTypePassByValue, elements: !21, identifier: "_ZTS3Foo") | ||
| !21 = !{!22} | ||
| !22 = !DIDerivedType(tag: DW_TAG_member, name: "f", scope: !20, file: !1, line: 2, baseType: !18, size: 8) | ||
| !23 = !DILocation(line: 10, column: 6, scope: !10) | ||
| !24 = !DILocation(line: 11, column: 1, scope: !10) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| ; REQUIRES: asserts | ||
| ; REQUIRES: x86-registered-target | ||
|
|
||
| ;; Tests that accelerator table switches correctly from TU to CU when a top level TU is re-used. | ||
| ;; Assert is not triggered. | ||
| ;; File1 | ||
| ;; struct Foo { | ||
| ;; char fChar; | ||
| ;; }; | ||
| ;; Foo fGlobal; | ||
| ;; FIle2 | ||
| ;; struct Foo { | ||
| ;; char fChar; | ||
| ;; }; | ||
| ;; Foo fGlobal2; | ||
| ;; clang++ <file>.cpp -O0 -g2 -fdebug-types-section -gpubnames -S -emit-llvm -o <file>.ll | ||
| ;; llvm-link file1.ll file2.ll -S -o thinlto-debug-names-tu-reuse.ll | ||
|
|
||
| ; RUN: llc -O0 -dwarf-version=5 -generate-type-units -filetype=obj < %s -o %t.o | ||
| ; RUN: llvm-readelf --sections %t.o | FileCheck --check-prefix=OBJ %s | ||
|
|
||
| ; OBJ: debug_names | ||
|
|
||
| ; ModuleID = 'llvm-link' | ||
| source_filename = "llvm-link" | ||
| target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" | ||
| target triple = "x86_64-unknown-linux-gnu" | ||
|
|
||
| %struct.Foo = type { i8 } | ||
|
|
||
| @fGlobal = dso_local global %struct.Foo zeroinitializer, align 1, !dbg !0 | ||
| @fGlobal2 = dso_local global %struct.Foo zeroinitializer, align 1, !dbg !9 | ||
|
|
||
| !llvm.dbg.cu = !{!2, !11} | ||
| !llvm.ident = !{!14, !14} | ||
| !llvm.module.flags = !{!15, !16, !17, !18, !19, !20, !21} | ||
|
|
||
| !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) | ||
| !1 = distinct !DIGlobalVariable(name: "fGlobal", scope: !2, file: !3, line: 5, type: !5, isLocal: false, isDefinition: true) | ||
| !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 18.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false) | ||
| !3 = !DIFile(filename: "main.cpp", directory: "/smallTUReuse", checksumkind: CSK_MD5, checksum: "4f1831504f0948b03880356fae49cb58") | ||
| !4 = !{!0} | ||
| !5 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !3, line: 2, size: 8, flags: DIFlagTypePassByValue, elements: !6, identifier: "_ZTS3Foo") | ||
| !6 = !{!7} | ||
| !7 = !DIDerivedType(tag: DW_TAG_member, name: "fChar", scope: !5, file: !3, line: 3, baseType: !8, size: 8) | ||
| !8 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) | ||
| !9 = !DIGlobalVariableExpression(var: !10, expr: !DIExpression()) | ||
| !10 = distinct !DIGlobalVariable(name: "fGlobal2", scope: !11, file: !12, line: 5, type: !5, isLocal: false, isDefinition: true) | ||
| !11 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !12, producer: "clang version 18.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !13, splitDebugInlining: false) | ||
| !12 = !DIFile(filename: "helper.cpp", directory: "/smallTUReuse", checksumkind: CSK_MD5, checksum: "014145d46991fd1eb6a2192d382feb75") | ||
| !13 = !{!9} | ||
| !14 = !{!"clang version 18.0.0git"} | ||
| !15 = !{i32 7, !"Dwarf Version", i32 5} | ||
| !16 = !{i32 2, !"Debug Info Version", i32 3} | ||
| !17 = !{i32 1, !"wchar_size", i32 4} | ||
| !18 = !{i32 8, !"PIC Level", i32 2} | ||
| !19 = !{i32 7, !"PIE Level", i32 2} | ||
| !20 = !{i32 7, !"uwtable", i32 2} | ||
| !21 = !{i32 7, !"frame-pointer", i32 2} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s | ||
| // expected-no-diagnostics | ||
|
|
||
| template<typename T> concept C = true; | ||
|
|
||
| struct A { | ||
| template<C T> void f(); | ||
| }; | ||
|
|
||
| auto L = []<C T>{}; | ||
|
|
||
| template<typename X> | ||
| class Friends { | ||
| template<C T> friend void A::f(); | ||
| template<C T> friend void decltype(L)::operator()(); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |
| #include <windows.h> | ||
| #else | ||
| #include <signal.h> | ||
| #include <sys/wait.h> | ||
| #include <unistd.h> | ||
| #endif | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,159 @@ | ||
| // Test X86-64 passing ABI of struct in registers for the cases where the | ||
| // struct has more than one field. | ||
| // REQUIRES: x86-registered-target | ||
| // RUN: fir-opt -target-rewrite="target=x86_64-unknown-linux-gnu" %s -o - | FileCheck %s | ||
|
|
||
|
|
||
| module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", llvm.target_triple = "x86_64-unknown-linux-gnu"} { | ||
|
|
||
| func.func @test_call_i8_a16(%0 : !fir.ref<!fir.type<ti8_a16{a:!fir.array<16xi8>}>>) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<ti8_a16{a:!fir.array<16xi8>}>> | ||
| fir.call @test_func_i8_a16(%1) : (!fir.type<ti8_a16{a:!fir.array<16xi8>}>) -> () | ||
| return | ||
| } | ||
| // CHECK-LABEL: func.func @test_call_i8_a16( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.type<ti8_a16{a:!fir.array<16xi8>}>>) { | ||
| // CHECK: %[[VAL_1:.*]] = fir.load %[[VAL_0]] : !fir.ref<!fir.type<ti8_a16{a:!fir.array<16xi8>}>> | ||
| // CHECK: %[[VAL_2:.*]] = fir.call @llvm.stacksave.p0() : () -> !fir.ref<i8> | ||
| // CHECK: %[[VAL_3:.*]] = fir.alloca tuple<i64, i64> | ||
| // CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (!fir.ref<tuple<i64, i64>>) -> !fir.ref<!fir.type<ti8_a16{a:!fir.array<16xi8>}>> | ||
| // CHECK: fir.store %[[VAL_1]] to %[[VAL_4]] : !fir.ref<!fir.type<ti8_a16{a:!fir.array<16xi8>}>> | ||
| // CHECK: %[[VAL_5:.*]] = fir.load %[[VAL_3]] : !fir.ref<tuple<i64, i64>> | ||
| // CHECK: %[[VAL_6:.*]] = fir.extract_value %[[VAL_5]], [0 : i32] : (tuple<i64, i64>) -> i64 | ||
| // CHECK: %[[VAL_7:.*]] = fir.extract_value %[[VAL_5]], [1 : i32] : (tuple<i64, i64>) -> i64 | ||
| // CHECK: fir.call @test_func_i8_a16(%[[VAL_6]], %[[VAL_7]]) : (i64, i64) -> () | ||
| // CHECK: fir.call @llvm.stackrestore.p0(%[[VAL_2]]) : (!fir.ref<i8>) -> () | ||
| // CHECK: return | ||
|
|
||
| func.func private @test_func_i8_a16(%0 : !fir.type<ti8_a16{a:!fir.array<16xi8>}>) -> () { | ||
| return | ||
| } | ||
| // CHECK-LABEL: func.func private @test_func_i8_a16( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: i64, | ||
| // CHECK-SAME: %[[VAL_1:.*]]: i64) { | ||
| // CHECK: %[[VAL_2:.*]] = fir.undefined tuple<i64, i64> | ||
| // CHECK: %[[VAL_3:.*]] = fir.insert_value %[[VAL_2]], %[[VAL_0]], [0 : i32] : (tuple<i64, i64>, i64) -> tuple<i64, i64> | ||
| // CHECK: %[[VAL_4:.*]] = fir.insert_value %[[VAL_3]], %[[VAL_1]], [1 : i32] : (tuple<i64, i64>, i64) -> tuple<i64, i64> | ||
| // CHECK: %[[VAL_5:.*]] = fir.alloca tuple<i64, i64> | ||
| // CHECK: fir.store %[[VAL_4]] to %[[VAL_5]] : !fir.ref<tuple<i64, i64>> | ||
| // CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (!fir.ref<tuple<i64, i64>>) -> !fir.ref<!fir.type<ti8_a16{a:!fir.array<16xi8>}>> | ||
| // CHECK: %[[VAL_7:.*]] = fir.load %[[VAL_6]] : !fir.ref<!fir.type<ti8_a16{a:!fir.array<16xi8>}>> | ||
| // CHECK: return | ||
|
|
||
|
|
||
| // For the cases below, the argument marshalling logic is the same as above, | ||
| // so only the chosen signature is tested at the end. | ||
|
|
||
| func.func @test_call_i32_f32(%0 : !fir.ref<!fir.type<ti32_f32{i:i32,x:f32}>>) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<ti32_f32{i:i32,x:f32}>> | ||
| fir.call @test_func_i32_f32(%1) : (!fir.type<ti32_f32{i:i32,x:f32}>) -> () | ||
| return | ||
| } | ||
| func.func private @test_func_i32_f32(%0 : !fir.type<ti32_f32{i:i32,x:f32}>) -> () { | ||
| return | ||
| } | ||
|
|
||
| func.func @test_call_i32_i16(%0 : !fir.ref<!fir.type<ti32_i16{i:i32,x:i16}>>) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<ti32_i16{i:i32,x:i16}>> | ||
| fir.call @test_func_i32_i16(%1) : (!fir.type<ti32_i16{i:i32,x:i16}>) -> () | ||
| return | ||
| } | ||
| func.func private @test_func_i32_i16(%0 : !fir.type<ti32_i16{i:i32,x:i16}>) -> () { | ||
| return | ||
| } | ||
|
|
||
| func.func @test_call_f16_i16(%0 : !fir.ref<!fir.type<tf16_i16{i:f16,x:i16}>>) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<tf16_i16{i:f16,x:i16}>> | ||
| fir.call @test_func_f16_i16(%1) : (!fir.type<tf16_i16{i:f16,x:i16}>) -> () | ||
| return | ||
| } | ||
| func.func private @test_func_f16_i16(%0 : !fir.type<tf16_i16{i:f16,x:i16}>) -> () { | ||
| return | ||
| } | ||
|
|
||
| func.func @test_call_f16_f16(%0 : !fir.ref<!fir.type<tf16_f16{i:f16,x:f16}>>) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<tf16_f16{i:f16,x:f16}>> | ||
| fir.call @test_func_f16_f16(%1) : (!fir.type<tf16_f16{i:f16,x:f16}>) -> () | ||
| return | ||
| } | ||
| func.func private @test_func_f16_f16(%0 : !fir.type<tf16_f16{i:f16,x:f16}>) -> () { | ||
| return | ||
| } | ||
|
|
||
| func.func @test_call_i32_f64(%0 : !fir.ref<!fir.type<ti32_f64{i:i32,x:f64}>>) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<ti32_f64{i:i32,x:f64}>> | ||
| fir.call @test_func_i32_f64(%1) : (!fir.type<ti32_f64{i:i32,x:f64}>) -> () | ||
| return | ||
| } | ||
| func.func private @test_func_i32_f64(%0 : !fir.type<ti32_f64{i:i32,x:f64}>) -> () { | ||
| return | ||
| } | ||
|
|
||
| func.func @test_call_f64_f32(%0 : !fir.ref<!fir.type<tf64_f32{i:f64,x:f32}>>) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<tf64_f32{i:f64,x:f32}>> | ||
| fir.call @test_func_f64_f32(%1) : (!fir.type<tf64_f32{i:f64,x:f32}>) -> () | ||
| return | ||
| } | ||
| func.func private @test_func_f64_f32(%0 : !fir.type<tf64_f32{i:f64,x:f32}>) -> () { | ||
| return | ||
| } | ||
|
|
||
| func.func @test_call_f32_i32_f32_f32(%0 : !fir.ref<!fir.type<tf32_i32_f32_f32{i:i32,x:f32,y:f32,z:f32}>>) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<tf32_i32_f32_f32{i:i32,x:f32,y:f32,z:f32}>> | ||
| fir.call @test_func_f32_i32_f32_f32(%1) : (!fir.type<tf32_i32_f32_f32{i:i32,x:f32,y:f32,z:f32}>) -> () | ||
| return | ||
| } | ||
| func.func private @test_func_f32_i32_f32_f32(%0 : !fir.type<tf32_i32_f32_f32{i:i32,x:f32,y:f32,z:f32}>) -> () { | ||
| return | ||
| } | ||
|
|
||
| func.func @test_call_f64_i32(%before : i16, %0 : !fir.ref<!fir.type<tf64_i32{i:f64,x:i32}>>, %after : f128) { | ||
| %1 = fir.load %0 : !fir.ref<!fir.type<tf64_i32{i:f64,x:i32}>> | ||
| fir.call @test_func_f64_i32(%before, %1, %after) : (i16, !fir.type<tf64_i32{i:f64,x:i32}>, f128) -> () | ||
| return | ||
| } | ||
| func.func private @test_func_f64_i32(%before : i16, %0 : !fir.type<tf64_i32{i:f64,x:i32}>, %after : f128) -> () { | ||
| return | ||
| } | ||
| } | ||
|
|
||
| // CHECK-LABEL: func.func @test_call_i32_f32( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.type<ti32_f32{i:i32,x:f32}>>) { | ||
| // CHECK-LABEL: func.func private @test_func_i32_f32( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: i64) { | ||
| // CHECK-LABEL: func.func @test_call_i32_i16( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.type<ti32_i16{i:i32,x:i16}>>) { | ||
| // CHECK-LABEL: func.func private @test_func_i32_i16( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: i64) { | ||
| // CHECK-LABEL: func.func @test_call_f16_i16( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.type<tf16_i16{i:f16,x:i16}>>) { | ||
| // CHECK-LABEL: func.func private @test_func_f16_i16( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: i32) { | ||
| // CHECK-LABEL: func.func @test_call_f16_f16( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.type<tf16_f16{i:f16,x:f16}>>) { | ||
| // CHECK-LABEL: func.func private @test_func_f16_f16( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: f32) { | ||
| // CHECK-LABEL: func.func @test_call_i32_f64( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.type<ti32_f64{i:i32,x:f64}>>) { | ||
| // CHECK-LABEL: func.func private @test_func_i32_f64( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: i64, | ||
| // CHECK-SAME: %[[VAL_1:.*]]: f64) { | ||
| // CHECK-LABEL: func.func @test_call_f64_f32( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.type<tf64_f32{i:f64,x:f32}>>) { | ||
| // CHECK-LABEL: func.func private @test_func_f64_f32( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: f64, | ||
| // CHECK-SAME: %[[VAL_1:.*]]: f32) { | ||
| // CHECK-LABEL: func.func @test_call_f32_i32_f32_f32( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.type<tf32_i32_f32_f32{i:i32,x:f32,y:f32,z:f32}>>) { | ||
| // CHECK-LABEL: func.func private @test_func_f32_i32_f32_f32( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: i64, | ||
| // CHECK-SAME: %[[VAL_1:.*]]: f64) { | ||
| // CHECK-LABEL: func.func @test_call_f64_i32( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: i16, | ||
| // CHECK-SAME: %[[VAL_1:.*]]: !fir.ref<!fir.type<tf64_i32{i:f64,x:i32}>>, | ||
| // CHECK-SAME: %[[VAL_2:.*]]: f128) { | ||
| // CHECK-LABEL: func.func private @test_func_f64_i32( | ||
| // CHECK-SAME: %[[VAL_0:.*]]: i16, | ||
| // CHECK-SAME: %[[VAL_1:.*]]: f64, | ||
| // CHECK-SAME: %[[VAL_2:.*]]: i32, | ||
| // CHECK-SAME: %[[VAL_3:.*]]: f128) { |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ! RUN: %python %S/test_errors.py %s %flang_fc1 | ||
| ! Test error location when assignment starts with macro expansion. | ||
|
|
||
| #define X_VAR x | ||
| program main | ||
| real(4) :: x | ||
| character(10) :: c | ||
| !ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types REAL(4) and CHARACTER(KIND=1) | ||
| X_VAR = c | ||
| !ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types CHARACTER(KIND=1) and REAL(4) | ||
| c = X_VAR | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| //===----------------------------------------------------------------------===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| // <memory> | ||
|
|
||
| // Ensure that defining _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS yields a | ||
| // deprecation warning. We intend to issue a deprecation warning in LLVM 18 | ||
| // and remove the macro entirely in LLVM 19. As such, this test will be quite | ||
| // short lived. | ||
|
|
||
| // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS | ||
|
|
||
| // UNSUPPORTED: clang-modules-build | ||
|
|
||
| #include <memory> // expected-warning@* 1+ {{macro '_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS' has been marked as deprecated}} |