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

--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Apr 18 16:50:10 2019
New Revision: 270445

URL: https://gcc.gnu.org/viewcvs?rev=270445&root=gcc&view=rev
Log:
        PR c++/87554 - ICE with extern template and reference member.

The removed code ended up setting DECL_INITIAL to the INIT_EXPR returned by
split_nonconstant_init, which makes no sense.  This code was added back in
1996, so any rationale is long lost.

        * decl.c (cp_finish_decl): Don't set DECL_INITIAL of external vars.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/extern_template-5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c

Reply via email to