re PR c++/77553 (wrong code with post-increment operator in constexpr)
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Sep 2016 17:10:39 +0000 (19:10 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Sep 2016 17:10:39 +0000 (19:10 +0200)
commitea8661cd4794f3b31ea3a4410e9aa5de3df1e3aa
treedfb4f23dd508e41b13086ef84b698a9c55f80f64
parent072eee8f22b99e2362ccdc3930fbfc61e1800b63
re PR c++/77553 (wrong code with post-increment operator in constexpr)

PR c++/77553
* constexpr.c (cxx_fold_pointer_plus_expression): New function.
(cxx_eval_binary_expression): Use it for POINTER_PLUS_EXPR.
(cxx_eval_pointer_plus_expression): Remove.
(cxx_eval_constant_expression) <case POINTER_PLUS_EXPR>: Don't
call cxx_eval_pointer_plus_expression.

* g++.dg/cpp1y/constexpr-77553.C: New test.

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