diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-03-05 12:01:09 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2002-03-05 12:01:09 +0100 |
commit | 6d051694012ae2a672775499b5bac5c860575f62 (patch) | |
tree | cbe11b8bd74b28a3471cca15fd289add04ad61fe /gcc/ssa-ccp.c | |
parent | a562995d9198cc6ec9aa64137dde261370cdbb90 (diff) | |
download | gcc-6d051694012ae2a672775499b5bac5c860575f62.zip gcc-6d051694012ae2a672775499b5bac5c860575f62.tar.gz gcc-6d051694012ae2a672775499b5bac5c860575f62.tar.bz2 |
ssa-ccp.c (ssa_ccp_substitute_constants): Don't crash if def is NULL.
* ssa-ccp.c (ssa_ccp_substitute_constants): Don't crash if def
is NULL.
* gcc.dg/20020304-1.c: New test.
From-SVN: r50311
Diffstat (limited to 'gcc/ssa-ccp.c')
-rw-r--r-- | gcc/ssa-ccp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ssa-ccp.c b/gcc/ssa-ccp.c index 9d2d9c9..d1b597c 100644 --- a/gcc/ssa-ccp.c +++ b/gcc/ssa-ccp.c @@ -856,10 +856,14 @@ ssa_ccp_substitute_constants () { if (values[i].lattice_val == CONSTANT) { - rtx def = VARRAY_RTX (ssa_definition, i); - rtx set = single_set (def); + rtx def = VARRAY_RTX (ssa_definition, i), set; struct df_link *curruse; + /* Definition might have been deleted already. */ + if (! def) + continue; + + set = single_set (def); if (! set) continue; |