diff --git a/contrib/gcc/cp/decl.c b/contrib/gcc/cp/decl.c index 8b7a4880a29..0bf09d4b8e4 100644 --- a/contrib/gcc/cp/decl.c +++ b/contrib/gcc/cp/decl.c @@ -4967,8 +4967,8 @@ make_rtl_for_nonlocal_decl (tree decl, tree init, const char* asmspec) gcc_assert (TREE_STATIC (decl)); /* An in-class declaration of a static data member should be external; it is only a declaration, and not a definition. */ - if (init == NULL_TREE) - gcc_assert (DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl)); + if (init == NULL_TREE && DECL_INITIAL (decl) == NULL_TREE) + gcc_assert (DECL_EXTERNAL (decl)); } /* We don't create any RTL for local variables. */