re PR c++/71828 (ICE on valid C++11 code with constexpr __Complex int variable declar...
authorJakub Jelinek <jakub@redhat.com>
Mon, 18 Jul 2016 18:43:19 +0000 (20:43 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 18 Jul 2016 18:43:19 +0000 (20:43 +0200)
commit87713c6a507659921278d32b66f2e344b7c4d124
tree14d226bd0827f7153340d65294bb9e529dcf5911
parent7a7f16ca45487c0a414c9a3d06423ab80d0f6a4f
re PR c++/71828 (ICE on valid C++11 code with constexpr __Complex int variable declaration: in operand_equal_p, at fold-const.c:2790)

PR c++/71828
* constexpr.c (cxx_eval_constant_expression) <case REALPART_EXPR>:
For lval don't use cxx_eval_unary_expression and instead recurse
and if needed rebuild the reference.

* g++.dg/cpp0x/constexpr-71828.C: New test.

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