re PR target/23828 (local calling convention not used when using --combine)
authorDan Nicolaescu <dann@ics.uci.edu>
Sun, 25 Sep 2005 20:01:07 +0000 (20:01 +0000)
committerDan Nicolaescu <dann@gcc.gnu.org>
Sun, 25 Sep 2005 20:01:07 +0000 (20:01 +0000)
PR 23828
* config/i386/i386.c (ix86_function_regparm): Fix the test for
a nested function.

From-SVN: r104623

gcc/ChangeLog
gcc/config/i386/i386.c

index 5d20b881af50c0fdc74242ac17f4414ee7ef0571..d64329774a8307fc7754432042a68d0be53f0689 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-25  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       PR 23828
+       * config/i386/i386.c (ix86_function_regparm): Fix the test for
+       a nested function.
+
 2005-09-25  Richard Henderson  <rth@redhat.com>
 
        * config/alpha/alpha.c (tls_symbolic_operand_1): Trust
index 914e66ea0e0629b18716dcdeae16b28983d3a764..6d90a009cde9149dab33a74350334a626f282aaf 100644 (file)
@@ -2158,7 +2158,8 @@ ix86_function_regparm (tree type, tree decl)
              /* We can't use regparm(3) for nested functions as these use
                 static chain pointer in third argument.  */
              if (local_regparm == 3
-                 && DECL_CONTEXT (decl) && !DECL_NO_STATIC_CHAIN (decl))
+                 && decl_function_context (decl)
+                 && !DECL_NO_STATIC_CHAIN (decl))
                local_regparm = 2;
              /* Each global register variable increases register preassure,
                 so the more global reg vars there are, the smaller regparm