re PR middle-end/26869 (Segfault in find_lattice_value() for complex operands.)

2006-04-24  Richard Guenther  <rguenther@suse.de>

	PR middle-end/26869
	* tree-complex.c (update_parameter_components): Don't handle
	unused parameters which have no default def.

	* gcc.dg/torture/pr26869.c: New testcase.

From-SVN: r113219
This commit is contained in:
Richard Guenther 2006-04-24 08:21:41 +00:00 committed by Richard Biener
parent 72fa5e06ab
commit c0a3f887e5
4 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-04-24 Richard Guenther <rguenther@suse.de>
PR middle-end/26869
* tree-complex.c (update_parameter_components): Don't handle
unused parameters which have no default def.
2006-04-24 Andrew Pinski <pinskia@gcc.gnu.org>
Richard Guenther <rguenther@suse.de>

View File

@ -1,3 +1,8 @@
2006-04-24 Richard Guenther <rguenther@suse.de>
PR middle-end/26869
* gcc.dg/torture/pr26869.c: New testcase.
2006-04-24 Andrew Pinski <pinskia@gcc.gnu.org>
Richard Guenther <rguenther@suse.de>

View File

@ -0,0 +1,7 @@
/* { dg-do compile } */
_Complex float f (_Complex float b, _Complex float c)
{
_Complex float a = 1.0 + 0.0i;
return a / c;
}

View File

@ -652,6 +652,8 @@ update_parameter_components (void)
type = TREE_TYPE (type);
ssa_name = default_def (parm);
if (!ssa_name)
continue;
r = build1 (REALPART_EXPR, type, ssa_name);
i = build1 (IMAGPART_EXPR, type, ssa_name);