re PR tree-optimization/32328 (-fstrict-aliasing causes skipped code)
authorRichard Guenther <rguenther@suse.de>
Thu, 23 Aug 2007 12:41:59 +0000 (12:41 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 23 Aug 2007 12:41:59 +0000 (12:41 +0000)
2007-08-23  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/32328
        * testsuite/gcc.dg/pr32328.c: New testcase.

From-SVN: r127736

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

index ef44671770637104e6f0df67b447ee7b461b7e04..9b17200f3ae25958707111aaa4d1b76b2e2f0477 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" } } */