summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/global-init.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-04-12 01:01:22 +0000
committerJohn McCall <rjmccall@apple.com>2011-04-12 01:01:22 +0000
commit32f44bd0fcf93d99dd0010bd7724c6520b716db2 (patch)
tree9d6caba9208fe64fa11607a0599c26692fe26c6c /clang/test/CodeGenCXX/global-init.cpp
parentf31fac471254c114fb7f756be474ac7eadffd236 (diff)
downloadbcm5719-llvm-32f44bd0fcf93d99dd0010bd7724c6520b716db2.tar.gz
bcm5719-llvm-32f44bd0fcf93d99dd0010bd7724c6520b716db2.zip
Ignore indirect field declarations. Fixes PR9570.
llvm-svn: 129337
Diffstat (limited to 'clang/test/CodeGenCXX/global-init.cpp')
-rw-r--r--clang/test/CodeGenCXX/global-init.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/global-init.cpp b/clang/test/CodeGenCXX/global-init.cpp
index 60032708168..752223bc7b8 100644
--- a/clang/test/CodeGenCXX/global-init.cpp
+++ b/clang/test/CodeGenCXX/global-init.cpp
@@ -90,6 +90,13 @@ namespace PR5974 {
// CHECK-NEXT: sub
// CHECK-NEXT: store i32 {{.*}}, i32* @_ZN5test1L1yE
+// PR9570: the indirect field shouldn't crash IR gen.
+namespace test5 {
+ union {
+ unsigned bar[4096] __attribute__((aligned(128)));
+ };
+}
+
// At the end of the file, we check that y is initialized before z.
// CHECK: define internal void @_GLOBAL__I_a() section "__TEXT,__StaticInit,regular,pure_instructions" {
OpenPOWER on IntegriCloud