diff options
Diffstat (limited to 'clang/test/CodeGen/static-order.c')
-rw-r--r-- | clang/test/CodeGen/static-order.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/CodeGen/static-order.c b/clang/test/CodeGen/static-order.c new file mode 100644 index 00000000000..c63f4ed892a --- /dev/null +++ b/clang/test/CodeGen/static-order.c @@ -0,0 +1,19 @@ +// RUN: clang -emit-llvm -o - %s | not grep "zeroinitializer" + +struct s { + int a; +}; + +static void *v; + +static struct s a; + +static struct s a = { + 10 +}; + +void *f() +{ + if (a.a) + return v; +} |