PR c++/85746: Don't fold __builtin_constant_p prematurely
authorMarc Glisse <marc.glisse@inria.fr>
Tue, 22 Oct 2019 14:42:38 +0000 (16:42 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Tue, 22 Oct 2019 14:42:38 +0000 (14:42 +0000)
commitb09a67eaa107c96203db449af6461f1d35665f57
treed9a72e2a7e3e377188a2b3a7cd247ceb8bce9808
parent761a3a95ee26d54fbb8351c15cf5773d58fc9f70
PR c++/85746: Don't fold __builtin_constant_p prematurely

2019-10-22  Marc Glisse  <marc.glisse@inria.fr>

gcc/cp/
* constexpr.c (cxx_eval_builtin_function_call): Only set
force_folding_builtin_constant_p if manifestly_const_eval.

gcc/testsuite/
* g++.dg/pr85746.C: New file.

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