[PATCH][4.1/4.2] Fix PR26869, ICE in find_lattice_value

Richard Guenther rguenther@suse.de
Wed Apr 19 07:59:00 GMT 2006


This fixes PR26869 by honouring the fact that unused parameters do
not have a default def.

Bootstrapped and tested on x86_64-unknown-linux-gnu.

Ok for mainline and 4.1?

Thanks,
Richard.

:ADDPATCH middle-end:

2006-04-18  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.

Index: tree-complex.c
===================================================================
*** tree-complex.c	(revision 113042)
--- tree-complex.c	(working copy)
*************** update_parameter_components (void)
*** 652,657 ****
--- 652,659 ----
  
        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);

/* { dg-do compile } */

_Complex float f (_Complex float b, _Complex float c)
{
  _Complex float a = 1.0 + 0.0i;
  return a / c;
}



More information about the Gcc-patches mailing list