Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -triple i386-unknown-unknown -O1 -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
      8 // <rdar://problem/6113085>
      9 
     10 struct s0 {
     11   int x, y;
     12 };
     13 
     14 int f0() {
     15   struct s0 x = {0};
     16   return x.y;
     17 }
     18 
     19 int f1() {
     20   struct s0 x[2] = { {0} };
     21   return x[1].x;
     22 }
     23 
     24 int f2() {
     25   int x[2] = { 0 };
     26   return x[1];
     27 }
     28 
     29