diff options
| author | Duncan Sands <baldrick@free.fr> | 2007-03-20 14:13:20 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2007-03-20 14:13:20 +0000 |
| commit | 3a7f7ab73f43c5a17867071eab335b07787c779a (patch) | |
| tree | 9ec0c77781f8f4b3976347ebe7e982d915002da1 /test/CFrontend | |
| parent | 2cde46cb6645569db996b303716080a92bbdfa9b (diff) | |
| download | external_llvm-3a7f7ab73f43c5a17867071eab335b07787c779a.zip external_llvm-3a7f7ab73f43c5a17867071eab335b07787c779a.tar.gz external_llvm-3a7f7ab73f43c5a17867071eab335b07787c779a.tar.bz2 | |
Test handling of structs with multiple variable-sized fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend')
| -rw-r--r-- | test/CFrontend/2007-03-06-VarSizeInStruct1.c | 8 | ||||
| -rw-r--r-- | test/CFrontend/2007-03-06-VarSizeInStruct2.c | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/CFrontend/2007-03-06-VarSizeInStruct1.c b/test/CFrontend/2007-03-06-VarSizeInStruct1.c new file mode 100644 index 0000000..8d28a1d --- /dev/null +++ b/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/test/CFrontend/2007-03-06-VarSizeInStruct2.c b/test/CFrontend/2007-03-06-VarSizeInStruct2.c new file mode 100644 index 0000000..13bc3aa --- /dev/null +++ b/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]; +} |
