https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87567
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Wed Oct 10 21:11:18 2018 New Revision: 265027 URL: https://gcc.gnu.org/viewcvs?rev=265027&root=gcc&view=rev Log: PR c++/87567 - constexpr rejects call to non-constexpr function. * constexpr.c (potential_constant_expression_1) <case FOR_STMT>: Return true if the condition is always false. <case WHILE_STMT>: Likewise. * g++.dg/cpp1y/constexpr-loop7.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-loop7.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/constexpr.c trunk/gcc/testsuite/ChangeLog