https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77553
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Sep 16 09:37:08 2016 New Revision: 240181 URL: https://gcc.gnu.org/viewcvs?rev=240181&root=gcc&view=rev Log: Backported from mainline 2016-09-13 Jakub Jelinek <ja...@redhat.com> 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. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp1y/constexpr-77553.C Modified: branches/gcc-6-branch/gcc/cp/ChangeLog branches/gcc-6-branch/gcc/cp/constexpr.c branches/gcc-6-branch/gcc/testsuite/ChangeLog