------- Comment #3 from ktietz at gcc dot gnu dot org 2008-12-02 11:37 ------- Created an attachment (id=16809) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16809&action=view) Patch file
I can reproduce it and the patch here should solve it. The main reason is in i386 target ix86_reg_parm_stack_space(), which defaults for NULL_TREE fndecl to cfun, which is wrong in this context. Additionally init_cumulative_args() should verify first the fndecl and just when not present the fntype. In middle-end there is compute_argument_addresses() (calls.c), which needs as fallback the fntype passed for proper call of aggregate_value_p(). The part in function.c could be superflous. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38366