aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-17 22:04:28 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-17 22:04:28 +0000
commit086925d8cc71897027ae9407fcfd0def1d767b1e (patch)
treedb51a328158ac878506f8f1fb8cd20618dad5f59 /gcc/stmt.c
parent8e91754ed432246436075871d84d87de2390c405 (diff)
downloadgcc-086925d8cc71897027ae9407fcfd0def1d767b1e.zip
gcc-086925d8cc71897027ae9407fcfd0def1d767b1e.tar.gz
gcc-086925d8cc71897027ae9407fcfd0def1d767b1e.tar.bz2
stmt.c (preserve_subexpressions_p): Don't crash when current_function->stmt is unset.
* stmt.c (preserve_subexpressions_p): Don't crash when current_function->stmt is unset. From-SVN: r29485
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 1a16adc..9246594 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -2603,7 +2603,8 @@ preserve_subexpressions_p ()
if (flag_expensive_optimizations)
return 1;
- if (optimize == 0 || current_function == 0 || loop_stack == 0)
+ if (optimize == 0 || current_function == 0
+ || current_function->stmt == 0 || loop_stack == 0)
return 0;
insn = get_last_insn_anywhere ();