New testcase identified by Brian Gaeke. Gotta love GCC extensions. :(
authorChris Lattner <sabre@nondot.org>
Fri, 23 May 2003 15:07:31 +0000 (15:07 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 23 May 2003 15:07:31 +0000 (15:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6310 91177308-0d34-0410-b5e6-96231b3b80d8

test/C++Frontend/2003-05-23-TransparentUnion.c [new file with mode: 0644]

diff --git a/test/C++Frontend/2003-05-23-TransparentUnion.c b/test/C++Frontend/2003-05-23-TransparentUnion.c
new file mode 100644 (file)
index 0000000..870826a
--- /dev/null
@@ -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;
+}