xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2009-03-08-ZeroEltStructCrash.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 -emit-llvm %s -o -
2 // PR3744
3 struct Empty {};
4 struct Union {
5  union {
6    int zero_arr[0];
7  } contents;
8 };
Foo(struct Union * u)9 static inline void Foo(struct Union *u) {
10  int *array = u->contents.zero_arr;
11 }
Bar(struct Union * u)12 static void Bar(struct Union *u) {
13  Foo(u);
14 }
15