stmt.c (preserve_subexpressions_p): Don't crash when current_function->stmt is unset.
authorMark Mitchell <mark@codesourcery.com>
Fri, 17 Sep 1999 22:04:28 +0000 (22:04 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 17 Sep 1999 22:04:28 +0000 (22:04 +0000)
* stmt.c (preserve_subexpressions_p): Don't crash when
current_function->stmt is unset.

From-SVN: r29485

gcc/ChangeLog
gcc/stmt.c

index f3d7e9fc6e56801877dceb8a4a7ee2ee7c9a6196..6b5daedeee0820e9756333a71976f3761fc3a3d4 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 17 15:07:37 1999  Mark Mitchell  <mark@codesourcery.com>
+
+       * stmt.c (preserve_subexpressions_p): Don't crash when
+       current_function->stmt is unset.
+
 Fri Sep 17 15:03:16 1999  Mark Mitchell  <mark@codesourcery.com>
 
        * stmt.c (expand_start_bindings): Allow callers to pass a flag
index 1a16adc46fc810003d233a7f28c1a01a7cc5869e..92465943f8545af8a6856e22fa03c55c49abd258 100644 (file)
@@ -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 ();