PR c++/65642
commitf070a7705e1502595184721d3623ae5a59cd4a79
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Apr 2015 16:51:27 +0000 (2 16:51 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Apr 2015 16:51:27 +0000 (2 16:51 +0000)
tree2c4f955abf98010c78d3a09f5436b8018d6dbdfd
parentdfec190b121ec95ea292155aff38e1330641a162
PR c++/65642
* constexpr.c (cxx_eval_pointer_plus_expression): Call
cxx_eval_constant_expression on the first operand.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221843 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-fold1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-fold2.C [new file with mode: 0644]