[Bug middle-end/50060] intrinsics not folded by the middle-end
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 20 14:00:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50060
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jul 20 14:00:02 2016
New Revision: 238520
URL: https://gcc.gnu.org/viewcvs?rev=238520&root=gcc&view=rev
Log:
PR c++/50060
* constexpr.c (cxx_eval_builtin_function_call): Pass false as lval
when evaluating call arguments. Use fold_builtin_call_array instead
of fold_build_call_array_loc, return t if it returns NULL. Otherwise
check the result with potential_constant_expression and call
cxx_eval_constant_expression on it.
* g++.dg/cpp0x/constexpr-50060.C: New test.
* g++.dg/cpp1y/constexpr-50060.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-50060.C
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-50060.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list