[Bug rtl-optimization/80747] [6/7/8 Regression] gcc.dg/tree-ssa/tailrecursion-4.c fails with ICE when compiled with options "-fprofile-use -freorder-blocks-and-partition"

segher at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 15 17:54:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80747

--- Comment #3 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Hi Zhangwen,

That patch looks correct.  The explanation maybe not: the problem happens
if the earliest "end" is the entry block itself, not a real BB (that is,
if we start the function with a newly inserted jump).  We could detect
just that, and/or we can add some extra asserts; or do as in your patch,
that looks fine to me as well.

A few minor comments for when you submit the patch:

-- It is spelled "default", not "defualt";
-- We don't use "yoda conditions" in GCC ("0 == x");
-- You shouldn't use 0 but instead use BB_UNPARTITIONED.

Thanks for finding the problem and making a patch!


More information about the Gcc-bugs mailing list