real function foo (x, y)
real x, y
foo = y - x
do while (foo .gt. 180.)
foo = foo - 360.
enddo
do while (foo .le. -180.)
foo = foo + 360.
enddo
end
ICEs in various places depending on the exact -O level and target.
The problem is that __result_foo variable is given type not corresponding
to its kind which leads e.g. on i?86 -m32 to emit_move_insn ICE
(trying to copy a SFmode constant to DFmode var).
I'd say __result_foo should still use SFmode type, only return type of the
function should be DFmode and in the RETURN_EXPR widen it.
--
Summary: ICEs with -ff2c
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25392