apply_result_size uses reg_raw_mode for every register that is flagged with
FUNCTION_VALUE_REGNO_P. However, reg_raw_mode is the mode to save a single
hard register, while a return value can be held in multiple consecutive hard
registers, and FUNCTION_VALUE_REGNO_P has to be true only for the first one of
these. The problem can be observed at the moment (at least) for sh-elf as:
FAIL: gcc.dg/builtin-apply4.c execution test
--
Summary: builtin_apply uses wrong mode for multi-hard-register
return values
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amylaar at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23868