diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-03-31 08:13:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-03-31 08:13:57 +0000 |
commit | b38aa9af729c5cb861a66f12b7c36017d8587ca8 (patch) | |
tree | 323d7f7567e121a8833203d9e64303b82b0c3e06 /test/FrontendC | |
parent | 312babc93ff837d268b83ae829fdb122f40c34c8 (diff) | |
download | llvm-b38aa9af729c5cb861a66f12b7c36017d8587ca8.tar.gz llvm-b38aa9af729c5cb861a66f12b7c36017d8587ca8.tar.bz2 llvm-b38aa9af729c5cb861a66f12b7c36017d8587ca8.tar.xz |
Testcase for r128619 (PR9571).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128620 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendC')
-rw-r--r-- | test/FrontendC/2011-03-31-ArrayRefFolding.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/FrontendC/2011-03-31-ArrayRefFolding.c b/test/FrontendC/2011-03-31-ArrayRefFolding.c new file mode 100644 index 0000000000..403927931c --- /dev/null +++ b/test/FrontendC/2011-03-31-ArrayRefFolding.c @@ -0,0 +1,15 @@ +// RUN: %llvmgcc -S -o - -m32 -Os %s | FileCheck %s +// PR9571 + +struct t { + int x; +}; + +extern struct t *cfun; + +int f(void) { + if (!(cfun + 0)) +// CHECK: icmp eq %struct.t* %0, null + return 0; + return cfun->x; +} |