aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-23 15:07:31 +0000
committerChris Lattner <sabre@nondot.org>2003-05-23 15:07:31 +0000
commit28345b919363d0450cc59f1a48a5e142c24a9dd9 (patch)
treebe6b36b843a218068d21f64988c0e8da224bb85d
parentddaf500c26489169046eb130bf282d8f583c23ec (diff)
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
-rw-r--r--test/C++Frontend/2003-05-23-TransparentUnion.c20
1 files changed, 20 insertions, 0 deletions
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 0000000000..870826a595
--- /dev/null
+++ b/test/C++Frontend/2003-05-23-TransparentUnion.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+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;
+}