[llvm-commits] CVS: llvm/test/Regression/C++Frontend/2003-05-23-TransparentUnion.c

Chris Lattner lattner at cs.uiuc.edu
Fri May 23 10:08:01 PDT 2003


Changes in directory llvm/test/Regression/C++Frontend:

2003-05-23-TransparentUnion.c added (r1.1)

---
Log message:

New testcase identified by Brian Gaeke.  Gotta love GCC extensions. :(


---
Diffs of the changes:

Index: llvm/test/Regression/C++Frontend/2003-05-23-TransparentUnion.c
diff -c /dev/null llvm/test/Regression/C++Frontend/2003-05-23-TransparentUnion.c:1.1
*** /dev/null	Fri May 23 10:07:41 2003
--- llvm/test/Regression/C++Frontend/2003-05-23-TransparentUnion.c	Fri May 23 10:07:31 2003
***************
*** 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;
+ }





More information about the llvm-commits mailing list