From: Chris Lattner Date: Fri, 23 May 2003 15:07:31 +0000 (+0000) Subject: New testcase identified by Brian Gaeke. Gotta love GCC extensions. :( X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=28345b919363d0450cc59f1a48a5e142c24a9dd9;p=oota-llvm.git New testcase identified by Brian Gaeke. Gotta love GCC extensions. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6310 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/C++Frontend/2003-05-23-TransparentUnion.c b/test/C++Frontend/2003-05-23-TransparentUnion.c new file mode 100644 index 00000000000..870826a595a --- /dev/null +++ b/test/C++Frontend/2003-05-23-TransparentUnion.c @@ -0,0 +1,20 @@ +#include + +typedef union { + float *__fptr; + int *__iptr; +} UNION __attribute__ ((__transparent_union__)); + +int try(UNION U) { + return 1; +} +int test() { + int I; + float F; + return try(&I) | try(&F); +} + +int main() { + if (test()) printf("ok"); + return 0; +}