summaryrefslogtreecommitdiffstats
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 00000000000..9515a316d62
--- /dev/null
+++ b/clang/test/CodeGen/static-local-union.c
@@ -0,0 +1,4 @@
+// RUN: clang -emit-llvm < %s
+
+int a() {static union{int a;} r[2] = {1,2};return r[1].a;}
+
OpenPOWER on IntegriCloud