https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65398

--- Comment #11 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Mon Mar 30 18:39:17 2015
New Revision: 221777

URL: https://gcc.gnu.org/viewcvs?rev=221777&root=gcc&view=rev
Log:
    PR c++/65398
    * constexpr.c (cxx_fold_indirect_ref): Don't perform the
     *(&A[i] p+ j) => A[i + j] transformation here.
    (cxx_eval_pointer_plus_expression): New function.
    (cxx_eval_constant_expression): Use it here.

    * g++.dg/cpp0x/pr65398-2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/pr65398-2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to