This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Dec 2012 16:36:47 +0000
- Subject: [Bug rtl-optimization/55717] [4.8 Regression] ICE in form_sum, at reload.c:5400
- Auto-submitted: auto-generated
- References: <bug-55717-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55717
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu.org,
| |ebotcazou at gcc dot
| |gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-17 16:36:47 UTC ---
Ugh, this is a mess. simplify-rtx.c (and fwprop.c in one spot) calls
rtl_hooks.gen_lowpart_no_emit
in various places, but
gen_lowpart_no_emit_general
happily returns a non-lowpart rtx if gen_lowpart_if_possible returned NULL.
I guess for normal insns that is in the hope that whatever pass uses it will
reject such pattern as invalid, but as in DEBUG_INSNs no such checking is
performed, it happily emits sucgh bogus RTL into the RTL stream.
For expand_debug_expr, I guess cfgexpand.c (expand_call_stmt and
expand_debug_locations) could easily switch rtl_hooks to debug_rtl_hooks, which
would simply create a SUBREG if gen_lowpart_if_possible returned NULL, all
SUBREGs are valid in DEBUG_INSNs. But wonder about all the other passes that
call simplify_* functions on DEBUG_INSN content, guess we want to switch the
rtl_hooks in that case too.