aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-08-23 12:41:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-08-23 12:41:59 +0000
commitf3b45ab7127c8089ebc519fdbc462e63df98f69d (patch)
treef51a944f1f4c7323ab14cf8768148738a04f8c37 /gcc/testsuite
parent35f3782f4a742da812456d640a1f02a274598e87 (diff)
downloadgcc-f3b45ab7127c8089ebc519fdbc462e63df98f69d.zip
gcc-f3b45ab7127c8089ebc519fdbc462e63df98f69d.tar.gz
gcc-f3b45ab7127c8089ebc519fdbc462e63df98f69d.tar.bz2
re PR tree-optimization/32328 (-fstrict-aliasing causes skipped code)
2007-08-23 Richard Guenther <rguenther@suse.de> PR tree-optimization/32328 * testsuite/gcc.dg/pr32328.c: New testcase. From-SVN: r127736
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr32328.c17
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ef44671..9b17200 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..69b08fc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr32328.c
@@ -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" } } */