Commit d36837f4 by Zdenek Dvorak Committed by Zdenek Dvorak

re PR tree-optimization/16864 (Segmentation fault during tree tail call elimination)

	PR tree-optimization/16864
	* tree-tailcall.c (eliminate_tail_call): Do not create phi nodes
	for ssa names without default_def.

From-SVN: r85597
parent 943bf8b5
2004-08-05 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
PR tree-optimization/16864
* tree-tailcall.c (eliminate_tail_call): Do not create phi nodes
for ssa names without default_def.
2004-08-05 Richard Sandiford <rsandifo@redhat.com> 2004-08-05 Richard Sandiford <rsandifo@redhat.com>
* config/i386/i386.c (ix86_expand_prologue): If the function uses a * config/i386/i386.c (ix86_expand_prologue): If the function uses a
......
...@@ -730,7 +730,17 @@ eliminate_tail_call (struct tailcall *t) ...@@ -730,7 +730,17 @@ eliminate_tail_call (struct tailcall *t)
if (!phi) if (!phi)
{ {
tree name = var_ann (param)->default_def; tree name = var_ann (param)->default_def;
tree new_name = make_ssa_name (param, SSA_NAME_DEF_STMT (name)); tree new_name;
if (!name)
{
/* It may happen that the tag does not have a default_def in case
when all uses of it are dominated by a MUST_DEF. This however
means that it is not necessary to add a phi node for this
tag. */
continue;
}
new_name = make_ssa_name (param, SSA_NAME_DEF_STMT (name));
var_ann (param)->default_def = new_name; var_ann (param)->default_def = new_name;
phi = create_phi_node (name, first); phi = create_phi_node (name, first);
......
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