[Bug rtl-optimization/49847] [4.7/4.8/4.9 Regression] NULL deref in fold_rtx (prev_insn_cc0 == NULL)
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Feb 17 10:01:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49847
--- Comment #33 from rguenther at suse dot de <rguenther at suse dot de> ---
On Sun, 16 Feb 2014, law at redhat dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49847
>
> --- Comment #32 from Jeffrey A. Law <law at redhat dot com> ---
> The problem we're seeing is with the cc0-setter and cc0-user in different
> blocks, they're separated by a NOTE_BASIC_BLOCK.
>
> That causes CSE to blow up because it expects that the cc0-setter and
> cc0-user are always consecutive. While we're just seeing the failure in
> CSE right now, I'm sure there's a ton of places that assume the
> setter/user are inseparable as that has been the documented form for ~20
> years.
>
> From rtl.texi:
>
> The instruction setting the
> condition code must be adjacent to the instruction using the condition
> code; only @code{note} insns may separate them.
>
>
> We either need to relax that and audit all the HAVE_cc0 code to ensure it
> doesn't make that assumption, or we need to somehow restore the property that
> the setter and user are inseparable.
I think relaxing this constraint and allowing the cc0-setter and
cc0-user be separated by a fallthru-edge should be allowed
(and make sure that bb-reorder later doesn't separate the BBs)
More information about the Gcc-bugs
mailing list