[llvm-commits] CVS: llvm/test/CFrontend/2007-03-06-VarSizeInStruct1.c 2007-03-06-VarSizeInStruct2.c
Duncan Sands
baldrick at free.fr
Tue Mar 20 07:13:41 PDT 2007
Changes in directory llvm/test/CFrontend:
2007-03-06-VarSizeInStruct1.c added (r1.1)
2007-03-06-VarSizeInStruct2.c added (r1.1)
---
Log message:
Test handling of structs with multiple variable-sized fields.
---
Diffs of the changes: (+16 -0)
2007-03-06-VarSizeInStruct1.c | 8 ++++++++
2007-03-06-VarSizeInStruct2.c | 8 ++++++++
2 files changed, 16 insertions(+)
Index: llvm/test/CFrontend/2007-03-06-VarSizeInStruct1.c
diff -c /dev/null llvm/test/CFrontend/2007-03-06-VarSizeInStruct1.c:1.1
*** /dev/null Tue Mar 20 09:13:30 2007
--- llvm/test/CFrontend/2007-03-06-VarSizeInStruct1.c Tue Mar 20 09:13:20 2007
***************
*** 0 ****
--- 1,8 ----
+ // RUN: %llvmgcc %s -S -o -
+ void* p (int n) {
+ struct f {
+ char w; char x[n]; char z[];
+ } F;
+ F.x[0]='x';
+ return &F;
+ }
Index: llvm/test/CFrontend/2007-03-06-VarSizeInStruct2.c
diff -c /dev/null llvm/test/CFrontend/2007-03-06-VarSizeInStruct2.c:1.1
*** /dev/null Tue Mar 20 09:13:41 2007
--- llvm/test/CFrontend/2007-03-06-VarSizeInStruct2.c Tue Mar 20 09:13:20 2007
***************
*** 0 ****
--- 1,8 ----
+ // RUN: %llvmgcc %s -S -o -
+ char p (int n) {
+ struct f {
+ char w; char x[n]; char y[n];
+ } F;
+
+ return F.x[0];
+ }
More information about the llvm-commits
mailing list