summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-11-22 06:42:54 +0000
committerAnders Carlsson <andersca@mac.com>2008-11-22 06:42:54 +0000
commit4d5f2e532cd1628cb9a5114d7e9174120282723e (patch)
tree7dd6f8dc36e35ed81075ed244e2f080c96bcc83a
parentfdabe83c674615aa31633893279bd63172be8736 (diff)
downloadbcm5719-llvm-4d5f2e532cd1628cb9a5114d7e9174120282723e.tar.gz
bcm5719-llvm-4d5f2e532cd1628cb9a5114d7e9174120282723e.zip
Add test for PR2992.
llvm-svn: 59861
-rw-r--r--clang/test/CodeGen/const-init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c
index 0efab6f9036..bded2e0a3f6 100644
--- a/clang/test/CodeGen/const-init.c
+++ b/clang/test/CodeGen/const-init.c
@@ -13,3 +13,11 @@ void *d = c;
intptr_t e = c; // expected-warning {{incompatible pointer to integer conversion}}
int f, *g = __extension__ &f, *h = (1 != 1) ? &f : &f;
+
+union s2 {
+ struct {
+ struct { } *f0;
+ } f0;
+};
+
+int g0 = (int)(&(((union s2 *) 0)->f0.f0) - 0);
OpenPOWER on IntegriCloud