[Bug ipa/60026] [4.8/4.9 Regression] ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 3 18:10:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60026

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #5)
> (In reply to Jakub Jelinek from comment #4)
> > Created attachment 32030 [details]
> > gcc49-pr60026.patch
> > 
> > The problem is that for -O0 we don't create vdef/vuse at all, but I'd say we
> > shouldn't be cloning -O0 functions either, even when they don't have noclone
> > argument.  Thus perhaps something like attached patch?
> 
> While the idea of the patch is of course good, it seems that we only
> set cannot_be_copied.* in copy_forbidden in tree-inline.c, so perhaps
> it would be better to put the optimized test there as well so that we
> never have any ordering issues?

Not so easily, the problem is that copy_forbidden is called without fun being
actually cfun, and set_cfun is very expensive.  Do we ever call copy_forbidden
on functions that haven't been rewritten into SSA form yet?  If yes, it could
be even set e.g. during gimplification (if (!optimize)).



More information about the Gcc-bugs mailing list