This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/33094] [4.2/4.3 Regression] ICE on valid C++ virtual template static member in anonymous namespace



------- Comment #2 from ian at airs dot com  2007-08-17 14:31 -------
This patch fixes the problem and passes the g++ testsuite.

Index: cp/decl.c
===================================================================
--- cp/decl.c   (revision 127491)
+++ cp/decl.c   (working copy)
@@ -4963,7 +4963,7 @@ make_rtl_for_nonlocal_decl (tree decl, t
       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)
+      if (init == NULL_TREE && DECL_INITIAL (decl) == NULL_TREE)
        gcc_assert (DECL_EXTERNAL (decl));
     }



-- 

ian at airs dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.2                       |---


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]