aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f070889..3480403 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/87554 - ICE with extern template and reference member.
+ * decl.c (cp_finish_decl): Don't set DECL_INITIAL of external vars.
+
2020-02-25 Alexandre Oliva <aoliva@redhat.com>
PR c++/86747
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 6dc23ec3..5642791 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7301,8 +7301,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
&& ! (DECL_LANG_SPECIFIC (decl)
&& DECL_NOT_REALLY_EXTERN (decl)))
{
- if (init)
- DECL_INITIAL (decl) = init;
+ /* check_initializer will have done any constant initialization. */
}
/* A variable definition. */
else if (DECL_FUNCTION_SCOPE_P (decl) && !TREE_STATIC (decl))