[Bug c++/80297] [6/7 Regression] Compiler time crash: type mismatch in binary expression

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 4 07:45:00 GMT 2017


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
genmatch (correctly) allows tree sharing in GENERIC, just uses unshare_expr on
GENERIC parts that we still have in GIMPLE.

folding from inside the gimplifier is tricky for this reason (as it expects
unshared GENERIC).  I'd say the gimplifier needs to avoid GENERIC folding
and/or call unshare_expr on its results...

Given we now have "SSA" during gimplification the gimplifier could use
fold_stmt (gsi, follow_single_use_edges).  But I see this case is even
from the gimplify langhook doing the folding ... :/

As said, genmatch not avoiding tree sharing in GENERIC is a feature and
mimics what fold-const.c does so the issue isn't new but latent anyway.


More information about the Gcc-bugs mailing list