[Bug c++/87567] constexpr evaluation rejects call to non-constexpr function

2018-10-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87567

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-09
 CC|redi at gcc dot gnu.org|
 Ever confirmed|0   |1

[Bug c++/87567] constexpr evaluation rejects call to non-constexpr function

2018-10-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87567

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

[Bug c++/87567] constexpr evaluation rejects call to non-constexpr function

2018-10-10 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87567

--- Comment #1 from Marek Polacek  ---
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) : Return
true if the condition is always false.
: 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

[Bug c++/87567] constexpr evaluation rejects call to non-constexpr function

2018-10-10 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87567

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Marek Polacek  ---
Fxied.