diff options
author | Richard Guenther <rguenther@suse.de> | 2008-02-17 15:06:53 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-02-17 15:06:53 +0000 |
commit | f0a77246d3d8bdf1e72502ed94c6f8c56e45333d (patch) | |
tree | 2d5e1161b4800aa52bde6044527705c5a433fe4a /gcc/tree-complex.c | |
parent | e09deb1401d411beebe1f56c8435bb9af8e1f4cc (diff) | |
download | gcc-f0a77246d3d8bdf1e72502ed94c6f8c56e45333d.tar.gz |
re PR middle-end/35227 (gcc ICEs for functions with unused complex argument)
2008-02-17 Richard Guenther <rguenther@suse.de>
PR middle-end/35227
* tree-complex.c (init_parameter_lattice_values): Handle parameters
without default definition.
* gcc.dg/torture/pr35227.c: New testcase.
From-SVN: r132379
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r-- | gcc/tree-complex.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index a1964ee6813..b9c7ebc489f 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -161,15 +161,14 @@ is_complex_reg (tree lhs) static void init_parameter_lattice_values (void) { - tree parm; + tree parm, ssa_name; for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = TREE_CHAIN (parm)) - if (is_complex_reg (parm) && var_ann (parm) != NULL) - { - tree ssa_name = gimple_default_def (cfun, parm); - VEC_replace (complex_lattice_t, complex_lattice_values, - SSA_NAME_VERSION (ssa_name), VARYING); - } + if (is_complex_reg (parm) + && var_ann (parm) != NULL + && (ssa_name = gimple_default_def (cfun, parm)) != NULL_TREE) + VEC_replace (complex_lattice_t, complex_lattice_values, + SSA_NAME_VERSION (ssa_name), VARYING); } /* Initialize DONT_SIMULATE_AGAIN for each stmt and phi. Return false if |