OSDN Git Service

2007-08-23 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 Aug 2007 12:41:59 +0000 (12:41 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 Aug 2007 12:41:59 +0000 (12:41 +0000)
        PR tree-optimization/32328
        * testsuite/gcc.dg/pr32328.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127736 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr32328.c [new file with mode: 0644]

index ef44671..9b17200 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-23  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/32328
+       * testsuite/gcc.dg/pr32328.c: New testcase.
+
 2007-08-23  Rask Ingemann Lambertsen  <rask@sygehus.dk>
 
        * gcc.c-torture/execute/simd-4.x: Only run when stdint.h types are
diff --git a/gcc/testsuite/gcc.dg/pr32328.c b/gcc/testsuite/gcc.dg/pr32328.c
new file mode 100644 (file)
index 0000000..69b08fc
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+struct barstruct { char const* some_string; };
+
+void changethepointer(struct barstruct**);
+
+void baz()
+{
+        struct barstruct bar1;
+        struct barstruct* barptr = &bar1;
+        changethepointer(&barptr);
+        barptr->some_string = "Everything OK";
+}
+
+/* { dg-final { scan-tree-dump "Everything OK" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */