[llvm-commits] CVS: llvm/test/Regression/CFrontend/2004-11-27-VariableSizeInStructure.c

Chris Lattner lattner at cs.uiuc.edu
Sat Nov 27 16:40:12 PST 2004



Changes in directory llvm/test/Regression/CFrontend:

2004-11-27-VariableSizeInStructure.c added (r1.1)
---
Log message:

New testcase for PR360: http://llvm.cs.uiuc.edu/PR360 


---
Diffs of the changes:  (+11 -0)

Index: llvm/test/Regression/CFrontend/2004-11-27-VariableSizeInStructure.c
diff -c /dev/null llvm/test/Regression/CFrontend/2004-11-27-VariableSizeInStructure.c:1.1
*** /dev/null	Sat Nov 27 18:40:08 2004
--- llvm/test/Regression/CFrontend/2004-11-27-VariableSizeInStructure.c	Sat Nov 27 18:39:58 2004
***************
*** 0 ****
--- 1,11 ----
+ // RUN: %llvmgcc %s -S -o /dev/null
+ 
+ // GCC allows variable sized arrays in structures, crazy!
+ 
+ // This is PR360.
+ 
+ int sub1(int i, char *pi) {
+   typedef int foo[i];
+   struct bar {foo f1; int f2;} *p = (struct bar *) pi;
+   return p->f2;
+ }






More information about the llvm-commits mailing list