+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
--- /dev/null
+/* 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;
+}
+
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);
}