diff --git a/llvm/test/CFrontend/2007-03-06-VarSizeInStruct1.c b/llvm/test/CFrontend/2007-03-06-VarSizeInStruct1.c new file mode 100644 index 000000000000..8d28a1dbd58a --- /dev/null +++ b/llvm/test/CFrontend/2007-03-06-VarSizeInStruct1.c @@ -0,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; +} diff --git a/llvm/test/CFrontend/2007-03-06-VarSizeInStruct2.c b/llvm/test/CFrontend/2007-03-06-VarSizeInStruct2.c new file mode 100644 index 000000000000..13bc3aaf9ae7 --- /dev/null +++ b/llvm/test/CFrontend/2007-03-06-VarSizeInStruct2.c @@ -0,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]; +}