OSDN Git Service

*** empty log message ***
authormycroft <mycroft@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Jul 1992 22:35:25 +0000 (22:35 +0000)
committermycroft <mycroft@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Jul 1992 22:35:25 +0000 (22:35 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1530 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/calls.c

index 3c018e5..0836855 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;