This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77830] internal compiler error: in output_constructor_regular_field, at varasm.c:4968, when using constexpr (with testcase)


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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Dec 21 21:58:23 2016
New Revision: 243873

URL: https://gcc.gnu.org/viewcvs?rev=243873&root=gcc&view=rev
Log:
        PR c++/77830
        * constexpr.c (cxx_eval_array_reference): Perform out of bounds
        verification even if lval is true, just allow one past the last
        element in that case.
        (cxx_eval_store_expression): Detect stores to out of bound
        ARRAY_REF.

        * g++.dg/cpp1y/pr77830.C: New test.
        * g++.dg/cpp0x/pr65398.C: Adjust expected diagnostics.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]