From: Anders Carlsson Date: Sat, 22 Nov 2008 06:42:54 +0000 (+0000) Subject: Add test for PR2992. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd761cd1a73510f4577fa00d9a6ce15090a0a135;p=clang Add test for PR2992. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59861 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c index 0efab6f903..bded2e0a3f 100644 --- a/test/CodeGen/const-init.c +++ b/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);