OSDN Git Service

* gcc.dg/tree-ssa/pr23192.c: New test.
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Aug 2005 14:09:46 +0000 (14:09 +0000)
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Aug 2005 14:09:46 +0000 (14:09 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102656 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr23192.c [new file with mode: 0644]

index 0060ae6..2ec8fdb 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-02  Diego Novillo  <dnovillo@redhat.com>
+
+       * gcc.dg/tree-ssa/pr23192.c: New test.
+
 2005-08-02  James A. Morrison  <phython@gcc.gnu.org>
 
        * gcc.c-torture/execute/vrp-4.c: New test.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23192.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23192.c
new file mode 100644 (file)
index 0000000..2a606a5
--- /dev/null
@@ -0,0 +1,23 @@
+/* { dg-options "-O2" } */
+/* { dg-do run } */
+
+struct S { int i; } s;
+
+void f (struct S *q)
+{
+  int a, *p;
+  p = &a;
+  if (q)
+    p = &q->i;
+  *p = 1;
+}
+
+void abort (void);
+
+int main (void)
+{
+  f (&s);
+  if (s.i != 1)
+    abort ();
+  return 0;
+}