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.