This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64333] C++14 constexpr gives wrong results when a looping constexpr function is evaluated twice
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 17 Dec 2014 20:41:50 +0000
- Subject: [Bug c++/64333] C++14 constexpr gives wrong results when a looping constexpr function is evaluated twice
- Auto-submitted: auto-generated
- References: <bug-64333-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64333
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Dec 17 20:41:18 2014
New Revision: 218832
URL: https://gcc.gnu.org/viewcvs?rev=218832&root=gcc&view=rev
Log:
PR c++/64333
* constexpr.c (cxx_bind_parameters_in_call): non_constant_args parm.
(cxx_eval_call_expression): Don't cache calls with non-constant args.
(cxx_eval_constant_expression) [COMPOUND_EXPR]: Pass true for lval.
(cxx_eval_unary_expression, cxx_eval_binary_expression)
(cxx_eval_conditional_expression): Pass false for lval.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-initlist1.C
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-loop2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c