diff options
| author | dann <dann@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-25 20:01:07 +0000 |
|---|---|---|
| committer | dann <dann@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-25 20:01:07 +0000 |
| commit | c8f2d7c6fbda9abafb0f8307a0ddfefa037cd8a1 (patch) | |
| tree | d5b5eacaa04858942dbe50ce2f50b5cfe551b0a8 | |
| parent | ea284d73b0fe6cdd16fd8e315469000760bca962 (diff) | |
| download | ppe42-gcc-c8f2d7c6fbda9abafb0f8307a0ddfefa037cd8a1.tar.gz ppe42-gcc-c8f2d7c6fbda9abafb0f8307a0ddfefa037cd8a1.zip | |
PR 23828
* config/i386/i386.c (ix86_function_regparm): Fix the test for
a nested function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104623 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/config/i386/i386.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d20b881af5..d64329774a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 914e66ea0e0..6d90a009cde 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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 |

