Files
clang-p2996/clang/test/CodeGen/designated-initializers.c
Douglas Gregor 8aa6bf5b8e Fix <rdar://problem/6724396>, where we were silently dropping
GNU-style array designators, causing us to emit broken initializers.

llvm-svn: 67878
2009-03-27 23:40:29 +00:00

22 lines
427 B
C

// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o - | grep "<{ i8\* null, i32 1024 }>" &&
// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o - | grep "i32 0, i32 22"
struct foo {
void *a;
int b;
};
union { int i; float f; } u = { };
int main(int argc, char **argv)
{
union { int i; float f; } u2 = { };
static struct foo foo = {
.b = 1024,
};
}
int b[2] = {
[1] 22
};