https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85172
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 43839 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43839&action=edit gcc8-pr85172.patch Untested fix. The issue is that for certain builtins we say calls to them are potential constant expressions no matter what arguments they have. But we try to evaluate those arguments as constant expressions anyway, which creates a loophole, anything that is normally rejected as potential constant expression can through this appear in the constexpr.c evaluation.