OSDN Git Service

Test for PR1173
authorAnton Korobeynikov <asl@math.spbu.ru>
Mon, 5 Feb 2007 02:28:56 +0000 (02:28 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Mon, 5 Feb 2007 02:28:56 +0000 (02:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33895 91177308-0d34-0410-b5e6-96231b3b80d8

test/CFrontend/2007-02-04-AddrLValue-2.c [new file with mode: 0644]

diff --git a/test/CFrontend/2007-02-04-AddrLValue-2.c b/test/CFrontend/2007-02-04-AddrLValue-2.c
new file mode 100644 (file)
index 0000000..90251e6
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %llvmgcc %s -O3 -S -o - -emit-llvm
+// PR1173
+
+struct S { char s; };
+struct T { struct S t; };
+
+struct S *const p = &((struct T * const) (0x4000))->t;
+
+void
+foo (void)
+{
+  p->s = 0;
+}