OSDN Git Service

* rs6000/rs6000.c (rs6000_stack_info): Only do eabi setup for "main",
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 May 1997 20:42:42 +0000 (20:42 +0000)
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 May 1997 20:42:42 +0000 (20:42 +0000)
when main is the global main, not some nested routine that
happens to be called main.

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

gcc/config/rs6000/rs6000.c

index efc2577..e2d283d 100644 (file)
@@ -3032,7 +3032,8 @@ rs6000_stack_info ()
   if (TARGET_EABI)
 #endif
     {
-      if (strcmp (IDENTIFIER_POINTER (DECL_NAME (current_function_decl)), "main") == 0)
+      if (strcmp (IDENTIFIER_POINTER (DECL_NAME (current_function_decl)), "main") == 0
+         && DECL_CONTEXT (current_function_decl) == NULL_TREE)
        {
          info_ptr->main_p = 1;