*** empty log message ***
authorCharles Hannum <mycroft@gnu.org>
Wed, 8 Jul 1992 22:35:25 +0000 (22:35 +0000)
committerCharles Hannum <mycroft@gnu.org>
Wed, 8 Jul 1992 22:35:25 +0000 (22:35 +0000)
From-SVN: r1530

gcc/calls.c

index 3c018e50504c707648f75eb6ca09474502d470d8..0836855f17a9fef19d6a3c1ed693d8a0a1cf45c7 100644 (file)
@@ -138,10 +138,23 @@ calls_alloca (exp)
       break;
 
     case BLOCK:
-      /* Must not look at BLOCK_SUPERCONTEXT since it will point back to
-        us.  */
-      length = 3;
-      break;
+      {
+       register tree local;
+
+       for (local = BLOCK_VARS (exp); local; local = TREE_CHAIN (local))
+         if (calls_alloca (DECL_INITIAL (local)))
+           return 1;
+      }
+      {
+       register tree subblock;
+
+       for (subblock = BLOCK_SUBBLOCKS (exp);
+            subblock;
+            subblock = TREE_CHAIN (subblock))
+         if (calls_alloca (subblock))
+           return 1;
+      }
+      return 0;
 
     case METHOD_CALL_EXPR:
       length = 3;