Commit fae25b37 by Andrew MacLeod Committed by Andrew Macleod

Teach SCCVN that throwing expressions are not to be regenerated.

http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00764.html

Teach SCCVN that throwing expressions are not to be regenerated.

2008-01-17  Andrew MacLeod  <amacleod@redhat.com>

	* tree-ssa-sccvn.c (visit_use): Expressions which can throw are varying.	* gcc.c-torture/compile/pr34648.c: New testcase.

From-SVN: r131610
parent 2e152e16
2008-01-17 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/34648
* tree-ssa-sccvn.c (visit_use): Expressions which can throw are varying.
2008-01-17 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.h (LINK_SPEC): Support -mrelax and -mpmem-wrap-around.
......
2008-01-17 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/34648
* gcc.c-torture/compile/pr34648.c: New testcase.
2008-01-17 Sebastian Pop <sebastian.pop@amd.com>
PR testsuite/34821
/* PR tree-optimization/34648 */
/* { dg-do compile } */
/* { dg-options "-O2 -fexceptions" } */
extern const unsigned short int **bar (void) __attribute__ ((const));
const char *a;
int b;
char c;
char
foo (int *x)
{
char r;
c = '\0';
if (!b)
{
while (((*bar ())[a[*x]] & 0x2000) != 0)
(*x)++;
if (a[++(*x)] == '-')
{
(*x)++;
if (a[*x] && !((*bar ())[a[*x]] & 0x2000))
return '?';
}
if (!a[*x] || ((*bar ())[a[*x]] & 0x2000))
{
while (((*bar ())[a[*x]] & 0x2000))
++(*x);
return '\0';
}
}
r = a[*x];
b = a[*x] && !((*bar ())[a[*x]] & 0x2000);
return r;
}
......@@ -1609,7 +1609,8 @@ visit_use (tree use)
changed = visit_phi (stmt);
}
else if (TREE_CODE (stmt) != GIMPLE_MODIFY_STMT
|| (ann && ann->has_volatile_ops))
|| (ann && ann->has_volatile_ops)
|| tree_could_throw_p (stmt))
{
changed = defs_to_varying (stmt);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment