https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87567
Bug ID: 87567 Summary: constexpr evaluation rejects call to non-constexpr function Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: raphael.kubo.da.costa at intel dot com Target Milestone: --- This is similar to bug 86678, and can be reproduced with trunk: constexpr bool always_false() { return false; } int f() { return 1; } constexpr int g() { while (always_false()) return f(); return 0; } <source>: In function 'constexpr int g()': <source>:5:13: error: call to non-'constexpr' function 'int f()' 5 | return f(); | ~^~ It works with MSVC, ICC and clang (GCC also works if `while' is replaced with `if').