opnsense-src/test/CodeGen/designated-initializers.c

23 lines
378 B
C
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o %t
2009-11-18 09:59:57 -05:00
// RUN: grep "{ i8\* null, i32 1024 }" %t
2009-10-14 14:03:49 -04:00
// RUN: grep "i32 0, i32 22" %t
2009-06-02 13:58:47 -04:00
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
};