[Bug target/85666] gcc-8.0.1 fails to build mmix target: gcc/libgcc/libgcc2.h:203:20: internal compiler error: in leaf_function_p, at final.c:4488
wilco at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 8 10:24:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85666
Wilco <wilco at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wilco at gcc dot gnu.org
--- Comment #3 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Sergei Trofimovich from comment #1)
> #define MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS \
> (flag_exceptions \
> && ((reload_completed && df_regs_ever_live_p (MMIX_rJ_REGNUM)) \
> || !leaf_function_p ())) /// <- here
Yes that looks like a bug. leaf_function_p cannot be called on a sequence as it
will incorrectly return true on non-leaf functions. So
MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS will randomly change its result if
called again later. starting_frame_offset should however return a fixed value,
so the reload_completed part also looks wrong.
More information about the Gcc-bugs
mailing list