Commit c7a2139b by Richard Henderson

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
parent fda0adca
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> 2007-04-21 Douglas Gregor <doug.gregor@gmail.com>
* doc/standards.texi: Re-arrange into language-specific * doc/standards.texi: Re-arrange into language-specific
...@@ -307,7 +313,7 @@ ...@@ -307,7 +313,7 @@
compilation unit. compilation unit.
* langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define. * 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 This hook indicates if a type is generic. Set it by default
to "never generic". to "never generic".
* langhooks.h (struct lang_hooks_for_types): Add a new hook * langhooks.h (struct lang_hooks_for_types): Add a new hook
...@@ -353,7 +359,7 @@ ...@@ -353,7 +359,7 @@
2007-04-16 Aldy Hernandez <aldyh@redhat.com> 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> 2007-04-16 Kazu Hirata <kazu@codesourcery.com>
...@@ -463,7 +469,7 @@ ...@@ -463,7 +469,7 @@
2007-04-14 Andrew Pinski <andrew_pinski@playstation.sony.com> 2007-04-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c/31520 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. to store_init_value.
2007-04-14 Steven Bosscher <steven@gcc.gnu.org> 2007-04-14 Steven Bosscher <steven@gcc.gnu.org>
...@@ -573,7 +579,7 @@ ...@@ -573,7 +579,7 @@
[FLOAT_EXTEND]: Use SSE_FLOAT_MODE_P. [FLOAT_EXTEND]: Use SSE_FLOAT_MODE_P.
2007-04-12 Paolo Bonzini <bonzini@gnu.org> 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. * Makefile.in (stamp-as, stamp-collect-ld, stamp-nm): Remove.
(libgcc.mvars): Don't depend on them. (libgcc.mvars): Don't depend on them.
...@@ -1318,16 +1324,16 @@ ...@@ -1318,16 +1324,16 @@
2007-04-04 Chen Liqin <liqin@sunnorth.com.cn> 2007-04-04 Chen Liqin <liqin@sunnorth.com.cn>
* config/score/crti.asm: Change _bss_start to __bss_start. * config/score/crti.asm: Change _bss_start to __bss_start.
* config/score/score.h (CONDITIONAL_REGISTER_USAGE): Added. * config/score/score.h (CONDITIONAL_REGISTER_USAGE): Added.
(OUTGOING_REG_PARM_STACK_SPACE) update. (OUTGOING_REG_PARM_STACK_SPACE) update.
* config/score/score.opt: add options to make backend support * config/score/score.opt: add options to make backend support
score5, score5u, score7 and score7d. score5, score5u, score7 and score7d.
* config/score/score.md: Likewise. * config/score/score.md: Likewise.
* config/score/misc.md: Likewise. * config/score/misc.md: Likewise.
* config/score/mac.md: Likewise. * config/score/mac.md: Likewise.
* doc/invoke.texi: Likewise. * doc/invoke.texi: Likewise.
* doc/md.texi: update constraints define. * doc/md.texi: update constraints define.
2007-04-03 Richard Henderson <rth@redhat.com> 2007-04-03 Richard Henderson <rth@redhat.com>
......
...@@ -2895,12 +2895,15 @@ ix86_eax_live_at_start_p (void) ...@@ -2895,12 +2895,15 @@ ix86_eax_live_at_start_p (void)
static bool static bool
type_has_variadic_args_p (tree type) 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 == NULL)
if (t == void_list_node) return false;
return false;
return true; while ((n = TREE_CHAIN (t)) != NULL)
t = n;
return TREE_VALUE (t) != void_type_node;
} }
/* Value is the number of bytes of arguments automatically /* Value is the number of bytes of arguments automatically
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment