volatile _Complex float cf32 __attribute__((aligned(32)));
volatile _Complex double cd32 __attribute__((aligned(32)));
-// CHECK-LABEL-LABEL: define void @test_cf()
+// CHECK-LABEL: define void @test_cf()
void test_cf() {
// CHECK: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 0), align 4
// CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 1), align 4
// CHECK-NEXT: ret void
}
-// CHECK-LABEL-LABEL: define void @test_cd()
+// CHECK-LABEL: define void @test_cd()
void test_cd() {
// CHECK: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 0), align 8
// CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 8
// CHECK-NEXT: ret void
}
-// CHECK-LABEL-LABEL: define void @test_cf32()
+// CHECK-LABEL: define void @test_cf32()
void test_cf32() {
// CHECK: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 0), align 32
// CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 1), align 4
// CHECK-NEXT: ret void
}
-// CHECK-LABEL-LABEL: define void @test_cd32()
+// CHECK-LABEL: define void @test_cd32()
void test_cd32() {
// CHECK: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 0), align 32
// CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 1), align 8
int main2() {
// CHECK: [ DW_TAG_auto_variable ] [ptr] [line [[@LINE+2]]]
-// CHECK metadata !{i32 {{.*}}, metadata !{{.*}}, i32 [[@LINE+1]], {{.*}}} ; [ DW_TAG_lexical_block ]
+// CHECK: metadata !{i32 {{.*}}, metadata !{{.*}}, i32 [[@LINE+1]], {{.*}}} ; [ DW_TAG_lexical_block ]
if (char *ptr = return_char(1)) {
printf ("%s", ptr);
}
// CHECK: [ DW_TAG_auto_variable ] [ptr] [line [[@LINE+2]]]
-// CHECK metadata !{i32 {{.*}}, metadata !{{.*}}, i32 [[@LINE+1]], {{.*}}} ; [ DW_TAG_lexical_block ]
+// CHECK: metadata !{i32 {{.*}}, metadata !{{.*}}, i32 [[@LINE+1]], {{.*}}} ; [ DW_TAG_lexical_block ]
if (char *ptr = return_char(2)) {
printf ("%s", ptr);
}
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
-// PR
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -O2 -emit-llvm -o - | FileCheck %s
+// PR11480
void foo(int);
// CHECK: @llvm.global_ctors = appending global [3 x { i32, void ()* }] [{ i32, void ()* } { i32 200, void ()* @_GLOBAL__I_000200 }, { i32, void ()* } { i32 300, void ()* @_GLOBAL__I_000300 }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
// CHECK: _GLOBAL__I_000200()
-// CHECK_NEXT: _Z3fooi(i32 3)
+// CHECK: _Z3fooi(i32 3)
+// CHECK-NEXT: ret void
// CHECK: _GLOBAL__I_000300()
-// CHECK_NEXT: _Z3fooi(i32 2)
-// CHECK_NEXT: _Z3fooi(i32 1)
+// CHECK: _Z3fooi(i32 2)
+// CHECK-NEXT: _Z3fooi(i32 1)
+// CHECK-NEXT: ret void
// CHECK: _GLOBAL__I_a()
-// CHECK_NEXT: _Z3fooi(i32 1)
-// CHECK_NEXT: _Z3fooi(i32 4)
+// CHECK: _Z3fooi(i32 1)
+// CHECK-NEXT: _Z3fooi(i32 4)
+// CHECK-NEXT: ret void
C c;
A1 a1 __attribute__((init_priority (300)));