PR c++/87554 - ICE with extern template and reference member.
authorJason Merrill <jason@redhat.com>
Thu, 18 Apr 2019 16:50:10 +0000 (12:50 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 18 Apr 2019 16:50:10 +0000 (12:50 -0400)
commit7f0964e6f146e333b2d97b1f1a8518a733f3cc17
treeac99b51ca4bd9983b3b21fb9ef944874630a6da6
parent5f864b980af671c499756848a3d117968d253d4d
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.

From-SVN: r270445
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/g++.dg/cpp0x/extern_template-5.C [new file with mode: 0644]