blob: a5e191418c3398dbf63aa51190933124e48e5787 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// RUN: %clang_cc1 -triple i386-unknown-unknown -O2 -emit-llvm -o - %s | FileCheck %s
// CHECK-LABEL: define{{.*}} i32 @f0()
// CHECK: ret i32 0
// CHECK-LABEL: define{{.*}} i32 @f1()
// CHECK: ret i32 0
// CHECK-LABEL: define{{.*}} i32 @f2()
// CHECK: ret i32 0
struct s0 {
int x, y;
};
int f0(void) {
struct s0 x = {0};
return x.y;
}
int f1(void) {
struct s0 x[2] = { {0} };
return x[1].x;
}
int f2(void) {
int x[2] = { 0 };
return x[1];
}
|