re PR middle-end/50060 (intrinsics not folded by the middle-end)
authorJakub Jelinek <jakub@redhat.com>
Wed, 20 Jul 2016 14:00:02 +0000 (16:00 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 20 Jul 2016 14:00:02 +0000 (16:00 +0200)
commit109d2197c31b766daf9c7b138bc7eeaab12985df
treeb4130392d26901052d9c0f2e7c70f90f8177f8c5
parent2d06ca74a23cc87d2edc983f24a196a815af1c01
re PR middle-end/50060 (intrinsics not folded by the middle-end)

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.

From-SVN: r238520
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-50060.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-50060.C [new file with mode: 0644]