diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-28 00:39:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-28 00:39:58 +0000 |
commit | 1b64141716550fb8ffc9276ab5053b29bad7bb5c (patch) | |
tree | 8f8e29a7d38193e790d33f8c5c8ab73db2133b48 | |
parent | 9b5d395b410ba1509660c9d718410677b8c55c5e (diff) |
New testcase for PR360
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18296 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CFrontend/2004-11-27-VariableSizeInStructure.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CFrontend/2004-11-27-VariableSizeInStructure.c b/test/CFrontend/2004-11-27-VariableSizeInStructure.c new file mode 100644 index 0000000000..bd63ae3b01 --- /dev/null +++ b/test/CFrontend/2004-11-27-VariableSizeInStructure.c @@ -0,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; +} |