[Bug c++/82115] [8 Regression] ICE on (valid) C++11 code: Segmentation fault signal terminated program cc1plus

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 12 22:10:00 GMT 2017


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

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Dec 12 22:09:42 2017
New Revision: 255590

URL: https://gcc.gnu.org/viewcvs?rev=255590&root=gcc&view=rev
Log:
        PR c++/82115 - ICE with variable initialized with its own address.

        * cp-tree.h (struct lang_decl_base): Add dependent_init_p.
        (DECL_DEPENDENT_INIT_P, SET_DECL_DEPENDENT_INIT_P): New.
        * decl.c (cp_finish_decl): Set it.
        (duplicate_decls): Copy it.
        * pt.c (tsubst_decl): Clear it.
        (value_dependent_expression_p): Revert earlier change.  Check it.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-self1.C


More information about the Gcc-bugs mailing list