PR lto/40758
PR middle-end/41470
* tree-ssa-coalesce.c (coalesce_ssa_name): Add only SSA names
that are mentioned in the body.
testsuite/
* gcc.dg/pr41470.c: New test.
From-SVN: r152203
+2009-09-26 Michael Matz <matz@suse.de>
+
+ PR lto/40758
+ PR middle-end/41470
+ * tree-ssa-coalesce.c (coalesce_ssa_name): Add only SSA names
+ that are mentioned in the body.
+
2009-09-26 Michael Matz <matz@suse.de>
PR tree-optimization/41454
+2009-09-26 Michael Matz <matz@suse.de>
+
+ PR lto/40758
+ PR middle-end/41470
+ * gcc.dg/pr41470.c: New test.
+
2009-09-26 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/array9.adb: New test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fexceptions" } */
+void *
+af (void *a)
+{
+ return a;
+}
+void
+bf (void)
+{
+ void *p;
+ {
+ int i = 1;
+ char v[i];
+ p = af (v);
+ }
+ cf (p);
+}
{
tree a = ssa_name (i);
- if (a && SSA_NAME_VAR (a) && !DECL_ARTIFICIAL (SSA_NAME_VAR (a)))
+ if (a
+ && SSA_NAME_VAR (a)
+ && !DECL_ARTIFICIAL (SSA_NAME_VAR (a))
+ && (!has_zero_uses (a) || !SSA_NAME_IS_DEFAULT_DEF (a)))
{
tree *slot = (tree *) htab_find_slot (ssa_name_hash, a, INSERT);