From ffa45431c8b14008e5e2c0473c0de177ee0655ce Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 8 Aug 2008 07:00:26 +0000 Subject: [PATCH] Testcase for r54520. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54521 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FrontendC/2008-08-07-GEPIntToPtr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/FrontendC/2008-08-07-GEPIntToPtr.c diff --git a/test/FrontendC/2008-08-07-GEPIntToPtr.c b/test/FrontendC/2008-08-07-GEPIntToPtr.c new file mode 100644 index 00000000000..3ef3b66b88f --- /dev/null +++ b/test/FrontendC/2008-08-07-GEPIntToPtr.c @@ -0,0 +1,14 @@ +// RUN: %llvmgcc -S %s -o - | grep {i8 1} +// PR2603 + +struct A { + char num_fields; +}; + +struct B { + char a, b[1]; +}; + +const struct A Foo = { + (char *)(&( (struct B *)(16) )->b[0]) - (char *)(16) +};