diff options
author | Richard Guenther <rguenther@suse.de> | 2011-02-15 13:04:47 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-02-15 13:04:47 +0000 |
commit | 48feba283c479e010fb6e719b8cf25ac80b1c3e0 (patch) | |
tree | 6cb0402984137ab26b1c49cac3c642f930461b88 /gcc/testsuite | |
parent | ad1c1eeb76df357dacedaa1e6f3be33e3e8514e5 (diff) | |
download | gcc-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/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr47743.c | 22 |
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; +} + |