OSDN Git Service

* stmt.c (any_pending_cleanups): Don't crash when
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Sep 1999 11:31:14 +0000 (11:31 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Sep 1999 11:31:14 +0000 (11:31 +0000)
        current_function->stmt is unset.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29541 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/stmt.c

index 1d240ef..73e4124 100644 (file)
@@ -1,3 +1,8 @@
+Tue Sep 21 05:29:17 1999  Richard Earnshaw (rearnsha@arm.com)
+
+       * stmt.c (any_pending_cleanups): Don't crash when 
+       current_function->stmt is unset.
+
 Tue Sep 21 00:59:49 1999  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
 
        * emit-rtl.c (init_emit_once): Initialize const_int_rtx before
index 1100733..6483da5 100644 (file)
@@ -4334,7 +4334,8 @@ any_pending_cleanups (this_contour)
 {
   struct nesting *block;
 
-  if (block_stack == 0)
+  if (current_function == NULL || current_function->stmt == NULL
+      || block_stack == 0)
     return 0;
 
   if (this_contour && block_stack->data.block.cleanups != NULL)