Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / 2008-07-30-implicit-initialization.c
bloba5e191418c3398dbf63aa51190933124e48e5787
1 // RUN: %clang_cc1 -triple i386-unknown-unknown -O2 -emit-llvm -o - %s | FileCheck %s
2 // CHECK-LABEL: define{{.*}} i32 @f0()
3 // CHECK: ret i32 0
4 // CHECK-LABEL: define{{.*}} i32 @f1()
5 // CHECK: ret i32 0
6 // CHECK-LABEL: define{{.*}} i32 @f2()
7 // CHECK: ret i32 0
9 struct s0 {
10 int x, y;
13 int f0(void) {
14 struct s0 x = {0};
15 return x.y;
18 int f1(void) {
19 struct s0 x[2] = { {0} };
20 return x[1].x;
23 int f2(void) {
24 int x[2] = { 0 };
25 return x[1];