PR c++/87567 - constexpr rejects call to non-constexpr function.
commit8e9558f029123e00008d3ef464922128d018f0fc
authorMarek Polacek <polacek@redhat.com>
Wed, 10 Oct 2018 21:11:18 +0000 (10 21:11 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 10 Oct 2018 21:11:18 +0000 (10 21:11 +0000)
treefa1f1f4d7da86e9609be996a72bfb7854cd04aac
parentc6e8b0b3af4a2f1db9d1b13f54280c5401c53e4c
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.

From-SVN: r265027
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-loop7.C [new file with mode: 0644]