PR c++/87594 - constexpr rejects-valid with range-based for.
authorMarek Polacek <polacek@redhat.com>
Mon, 29 Oct 2018 19:40:18 +0000 (19:40 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 29 Oct 2018 19:40:18 +0000 (19:40 +0000)
commita385474c79d28d89861d25720715ed361e912b1a
treee4518fd6a8a63bf04eaf36911119522677b959f2
parenta4e30bef6446858bba7222afcf233c2d92e5c774
PR c++/87594 - constexpr rejects-valid with range-based for.

* constexpr.c (potential_constant_expression_1): If the condition
can't be evaluated, return true.

* g++.dg/cpp1y/constexpr-loop8.C: New test.

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