aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-07-14 14:53:30 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-07-14 14:53:30 +0000
commit1a5d20a4e01472c30e360f94b33373f1ab8e2354 (patch)
tree334b0e2f5c2ac0f46d98e0984a48323ca8f7287f /gcc/testsuite
parent5fbcc0ed20ecdfd980106ac22607c5baed60d234 (diff)
downloadgcc-1a5d20a4e01472c30e360f94b33373f1ab8e2354.zip
gcc-1a5d20a4e01472c30e360f94b33373f1ab8e2354.tar.gz
gcc-1a5d20a4e01472c30e360f94b33373f1ab8e2354.tar.bz2
re PR tree-optimization/49651 (nested lambdas and -O3 produced incorrect integer variable increments)
2011-07-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/49651 * tree-ssa-structalias.c (get_constraint_for_1): Properly handle dereferences with subvariables. * gcc.dg/torture/pr49651.c: New testcase. From-SVN: r176274
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr49651.c31
2 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 192c908..32b2a0a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-14 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/49651
+ * gcc.dg/torture/pr49651.c: New testcase.
+
2011-07-14 Georg-Johann Lay <avr@gjlay.de>
PR target/43746
diff --git a/gcc/testsuite/gcc.dg/torture/pr49651.c b/gcc/testsuite/gcc.dg/torture/pr49651.c
new file mode 100644
index 0000000..c58fe94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr49651.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+struct X {
+ int *p;
+ int *q;
+};
+
+void __attribute__((noinline, noclone))
+foo (struct X x) { *x.q = 0; }
+
+volatile int what;
+struct X y;
+
+int main()
+{
+ int i, j;
+ struct X x, *p;
+ x.p = &i;
+ x.q = &j;
+ if (what)
+ p = &y;
+ else
+ p = &x;
+ j = 1;
+ foo (*p);
+ if (j != 0)
+ abort ();
+ return 0;
+}