summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-08 09:04:29 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-08 09:04:29 +0000
commit8798f0ab16337490af6ed843dca3cdf507b049ee (patch)
tree1bcbe66ca04560818c01cb37d55bfeca1b3eebc8 /gcc
parent5a91be9e0306541265585e96d42dfa5b300accfe (diff)
downloadgcc-8798f0ab16337490af6ed843dca3cdf507b049ee.tar.gz
2014-07-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/61681 * tree-ssa-structalias.c (find_what_var_points_to): Expand NONLOCAL inside ESCAPED. * gcc.dg/torture/pr61681.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212349 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr61681.c37
-rw-r--r--gcc/tree-ssa-structalias.c4
4 files changed, 52 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 726c86f4b6e..3dcd84a66ef 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2014-07-08 Richard Biener <rguenther@suse.de>
+ PR tree-optimization/61681
+ * tree-ssa-structalias.c (find_what_var_points_to): Expand
+ NONLOCAL inside ESCAPED.
+
+2014-07-08 Richard Biener <rguenther@suse.de>
+
PR tree-optimization/61680
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
Handle properly all read-write dependences with group accesses.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 523e6c42355..635f8ea179c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2014-07-08 Richard Biener <rguenther@suse.de>
+ PR tree-optimization/61681
+ * gcc.dg/torture/pr61681.c: New testcase.
+
+2014-07-08 Richard Biener <rguenther@suse.de>
+
PR tree-optimization/61680
* gcc.dg/vect/pr61680.c: New testcase.
diff --git a/gcc/testsuite/gcc.dg/torture/pr61681.c b/gcc/testsuite/gcc.dg/torture/pr61681.c
new file mode 100644
index 00000000000..226de0c1aa7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr61681.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a = 1, *e = &a, **f = &e, *l, *p, j;
+static int b;
+long d;
+short g;
+
+void
+fn1 (int *p)
+{
+ int m;
+ if (!(*p & j))
+ {
+ int *n = &m;
+ for (d = 6; d; d--)
+ {
+ for (g = 0; g < 1; g++)
+ {
+ n = l = *f;
+ b = *p;
+ }
+ *n = 0;
+ }
+ }
+}
+
+int
+main ()
+{
+ p = *f;
+ fn1 (p);
+ if (b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 0472239f5b0..221877e955f 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -6106,6 +6106,10 @@ find_what_var_points_to (varinfo_t orig_vi)
pt->ipa_escaped = 1;
else
pt->escaped = 1;
+ /* Expand some special vars of ESCAPED in-place here. */
+ varinfo_t evi = get_varinfo (find (escaped_id));
+ if (bitmap_bit_p (evi->solution, nonlocal_id))
+ pt->nonlocal = 1;
}
else if (vi->id == nonlocal_id)
pt->nonlocal = 1;