aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2005-09-29 19:38:00 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2005-09-29 19:38:00 +0000
commit8d2c775f0175a71fefe00156505c9f5c50af4114 (patch)
treebb0627ae5f2c63a515449ff199a6679ce0a7e52b /gcc/testsuite/gcc.dg
parentffc53fb0fa533d427c814b3a00da426ce25e7003 (diff)
downloadgcc-8d2c775f0175a71fefe00156505c9f5c50af4114.zip
gcc-8d2c775f0175a71fefe00156505c9f5c50af4114.tar.gz
gcc-8d2c775f0175a71fefe00156505c9f5c50af4114.tar.bz2
re PR tree-optimization/24117 (struct is not marked fully as call clobbered)
2005-09-29 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/24117 * tree-ssa-structalias.c (find_func_aliases): Strip nops before considering whether to use anyoffset. From-SVN: r104791
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr24117.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr24117.c b/gcc/testsuite/gcc.dg/tree-ssa/pr24117.c
new file mode 100644
index 0000000..ffa5dd0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr24117.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+typedef struct {
+ int x;
+ int z;
+} Foo_t;
+
+char *xm;
+void bar(void);
+
+void foo(void)
+{
+ Foo_t x;
+ x.x = 1;
+ x.z = 2;
+ xm = (char *)&x;
+ bar();
+ /* We can't propagate x.z past bar, so this link_error should still be there. */
+ if (x.z != 2)
+ link_error ();
+}
+/* { dg-final { scan-tree-dump-times "link_error" 1 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */