re PR lto/40758 ([LTO] ICE in partition_view_bitmap, at tree-ssa-live.c:331)

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
This commit is contained in:
Michael Matz 2009-09-26 16:46:43 +00:00 committed by Michael Matz
parent 03b6f8a219
commit 0ffd2048ea
4 changed files with 35 additions and 1 deletions

View File

@ -1,3 +1,10 @@
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

View File

@ -1,3 +1,9 @@
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.

View File

@ -0,0 +1,18 @@
/* { 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);
}

View File

@ -1377,7 +1377,10 @@ coalesce_ssa_name (void)
{
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);