------- Comment #3 from hjl dot tools at gmail dot com 2008-04-23 13:07 ------- (In reply to comment #2) > Caused I believe by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124835 > likely together with http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01511.html > While in 4.2 functions with fntype without TYPE_ARG_TYPES (i.e. !prototype_p) > nregs, etc. would be preserved and maybe_vaarg set to true only afterwards, > in 4.3 it is set early and the calling convention is forced to stack. > > maybe_vaarg is only used in 2 places - in init_cumulative_args itself, in > !TARGET_64BIT case only, and in function_arg_64 (i.e. TARGET_64BIT case only). > If we want to restore 4.2 and earlier behavior (I think we have to), then > one fix could be e.g. only set maybe_vaarg to true for !prototype_p (fntype) > if TARGET_64BIT. > - ? (!prototype_p (fntype) || stdarg_p (fntype)) > + ? ((TARGET_64BIT && !prototype_p (fntype)) > + || stdarg_p (fntype)) > > As K&R fn declaration (i.e. !prototype_p) followed by stdarg_p definition or > prototype is diagnosed as an error by diagnose_arglist_conflict, I believe > this > is safe. >
Can you give it a try on both Linux/ia32 and Linux/x86-64? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36015