aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-02-15 13:04:47 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-02-15 13:04:47 +0000
commit48feba283c479e010fb6e719b8cf25ac80b1c3e0 (patch)
tree6cb0402984137ab26b1c49cac3c642f930461b88 /gcc/testsuite
parentad1c1eeb76df357dacedaa1e6f3be33e3e8514e5 (diff)
downloadgcc-48feba283c479e010fb6e719b8cf25ac80b1c3e0.zip
gcc-48feba283c479e010fb6e719b8cf25ac80b1c3e0.tar.gz
gcc-48feba283c479e010fb6e719b8cf25ac80b1c3e0.tar.bz2
re PR middle-end/47743 (PRE ICE in fold_convert_loc)
2011-02-15 Richard Guenther <rguenther@suse.de> PR tree-optimization/47743 * tree-ssa-pre.c (phi_translate_1): If we didn't get a value-number for a non-type-compatible VN lookup bail out. * gcc.dg/torture/pr47743.c: New testcase. From-SVN: r170173
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr47743.c22
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1c15f63..e60f6db 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-15 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/47743
+ * gcc.dg/torture/pr47743.c: New testcase.
+
2011-02-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/47581
diff --git a/gcc/testsuite/gcc.dg/torture/pr47743.c b/gcc/testsuite/gcc.dg/torture/pr47743.c
new file mode 100644
index 0000000..1930e94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr47743.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+int
+foo (void *x, int y)
+{
+ long long a = 1, *b;
+ double *c;
+ if (y)
+ {
+ b = (long long *) x;
+ while (b)
+ a *= *b++;
+ }
+ else
+ {
+ c = (double *) x;
+ while (c)
+ a *= *c++;
+ }
+ return a;
+}
+