------- Comment #3 from ktietz at gcc dot gnu dot org 2008-11-23 20:41 ------- Patch for this problem
Index: calls.c =================================================================== --- calls.c (revision 142122) +++ calls.c (working copy) @@ -2077,7 +2077,7 @@ } #ifdef REG_PARM_STACK_SPACE - reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl); + reg_parm_stack_space = REG_PARM_STACK_SPACE (!fndecl ? fntype : fndecl); #endif if (! OUTGOING_REG_PARM_STACK_SPACE ((!fndecl ? NULL_TREE : TREE_TYPE (fndecl))) Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 142122) +++ config/i386/i386.c (working copy) @@ -4547,9 +4547,11 @@ /* For libcalls it is possible that there is no fndecl at hand. Therefore assume for this case the default abi of the target. */ if (!fndecl) - call_abi = DEFAULT_ABI; + call_abi = (cfun ? cfun->machine->call_abi : DEFAULT_ABI); + else if (TREE_CODE (fndecl) == FUNCTION_DECL) + call_abi = ix86_function_abi (fndecl); else - call_abi = ix86_function_abi (fndecl); + call_abi = ix86_function_type_abi (fndecl); if (call_abi == 1) return 32; return 0; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38227