summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/static-local-union.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/static-local-union.c')
-rw-r--r--clang/test/CodeGen/static-local-union.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/CodeGen/static-local-union.c b/clang/test/CodeGen/static-local-union.c
new file mode 100644
index 0000000..bd32519
--- /dev/null
+++ b/clang/test/CodeGen/static-local-union.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -emit-llvm < %s
+
+int a() {static union{int a;} r[2] = {1,2};return r[1].a;}
+