This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++] Don't fold __builtin_constant_p prematurely


Adding a C++ maintainer in Cc:
https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00808.html

On Wed, 10 Jul 2019, Marc Glisse wrote:

Hello,

this avoids folding __builtin_constant_p to 0 early when we are not forced to do so. Clearly this has an effect, since it uncovered a bug in wi::lshift, fixed today ;-)

I wasn't sure about using |= or just =, the first one seemed more conservative.

Bootstrap+regtest on x86_64-pc-linux-gnu.

2019-07-11  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.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]