summaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-17 15:06:53 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-02-17 15:06:53 +0000
commit89cd38e0a3af0863982927c3d1858b4b920f1ca6 (patch)
tree2d5e1161b4800aa52bde6044527705c5a433fe4a /gcc/tree-complex.c
parentd149d356890a9ef2a81f4f0708a8b46fb2656469 (diff)
downloadgcc-89cd38e0a3af0863982927c3d1858b4b920f1ca6.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132379 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c13
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