diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2007-04-20 16:53:37 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2007-04-20 16:53:37 -0700 |
commit | c7a2139bef08cdc8fde38d3d59d88fd2c689e681 (patch) | |
tree | b7e69f3d7ede70da10f796e00a2d8b84345566c8 /gcc | |
parent | fda0adca8d936d3bb0089ec25a744e607e4af11c (diff) | |
download | gcc-c7a2139bef08cdc8fde38d3d59d88fd2c689e681.zip gcc-c7a2139bef08cdc8fde38d3d59d88fd2c689e681.tar.gz gcc-c7a2139bef08cdc8fde38d3d59d88fd2c689e681.tar.bz2 |
re PR target/31628 (stdcall function is miscompiled)
PR target/31628
* config/i386/i386.c (type_has_variadic_args_p): Look for any
TREE_LIST with a void_type_node value, not void_list_node exactly.
From-SVN: r124014
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 34 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 13 |
2 files changed, 28 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index acab492..f60a91b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-04-20 Richard Henderson <rth@redhat.com> + + PR target/31628 + * config/i386/i386.c (type_has_variadic_args_p): Look for any + TREE_LIST with a void_type_node value, not void_list_node exactly. + 2007-04-21 Douglas Gregor <doug.gregor@gmail.com> * doc/standards.texi: Re-arrange into language-specific @@ -307,7 +313,7 @@ compilation unit. * langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define. - (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add. + (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add. This hook indicates if a type is generic. Set it by default to "never generic". * langhooks.h (struct lang_hooks_for_types): Add a new hook @@ -353,7 +359,7 @@ 2007-04-16 Aldy Hernandez <aldyh@redhat.com> - * function.h: Remove sequence_stack extern declaration. + * function.h: Remove sequence_stack extern declaration. 2007-04-16 Kazu Hirata <kazu@codesourcery.com> @@ -463,7 +469,7 @@ 2007-04-14 Andrew Pinski <andrew_pinski@playstation.sony.com> PR c/31520 - * c-decl.c (finish_decl): Grab the type of the decl after the call + * c-decl.c (finish_decl): Grab the type of the decl after the call to store_init_value. 2007-04-14 Steven Bosscher <steven@gcc.gnu.org> @@ -573,7 +579,7 @@ [FLOAT_EXTEND]: Use SSE_FLOAT_MODE_P. 2007-04-12 Paolo Bonzini <bonzini@gnu.org> - Charles Wilson <libtool@cwilson.fastmail.fm> + Charles Wilson <libtool@cwilson.fastmail.fm> * Makefile.in (stamp-as, stamp-collect-ld, stamp-nm): Remove. (libgcc.mvars): Don't depend on them. @@ -1318,16 +1324,16 @@ 2007-04-04 Chen Liqin <liqin@sunnorth.com.cn> - * config/score/crti.asm: Change _bss_start to __bss_start. - * config/score/score.h (CONDITIONAL_REGISTER_USAGE): Added. - (OUTGOING_REG_PARM_STACK_SPACE) update. - * config/score/score.opt: add options to make backend support - score5, score5u, score7 and score7d. - * config/score/score.md: Likewise. - * config/score/misc.md: Likewise. - * config/score/mac.md: Likewise. - * doc/invoke.texi: Likewise. - * doc/md.texi: update constraints define. + * config/score/crti.asm: Change _bss_start to __bss_start. + * config/score/score.h (CONDITIONAL_REGISTER_USAGE): Added. + (OUTGOING_REG_PARM_STACK_SPACE) update. + * config/score/score.opt: add options to make backend support + score5, score5u, score7 and score7d. + * config/score/score.md: Likewise. + * config/score/misc.md: Likewise. + * config/score/mac.md: Likewise. + * doc/invoke.texi: Likewise. + * doc/md.texi: update constraints define. 2007-04-03 Richard Henderson <rth@redhat.com> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index cefe8ae..b785f49 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2895,12 +2895,15 @@ ix86_eax_live_at_start_p (void) static bool type_has_variadic_args_p (tree type) { - tree t; + tree n, t = TYPE_ARG_TYPES (type); - for (t = TYPE_ARG_TYPES (type); t; t = TREE_CHAIN (t)) - if (t == void_list_node) - return false; - return true; + if (t == NULL) + return false; + + while ((n = TREE_CHAIN (t)) != NULL) + t = n; + + return TREE_VALUE (t) != void_type_node; } /* Value is the number of bytes of arguments automatically |