[Bug c++/33094] [4.2/4.3 Regression] ICE on valid C++ virtual template static member in anonymous namespace
--- Comment #6 from jason at gcc dot gnu dot org 2007-09-30 02:41 --- Subject: Bug 33094 Author: jason Date: Sun Sep 30 02:41:39 2007 New Revision: 128890 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=128890 Log: PR c++/33094 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member constant to not have DECL_EXTERNAL if it's file-local. Added: trunk/gcc/testsuite/g++.dg/ext/visibility/anon6.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/decl2.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094
[Bug c++/33094] [4.2/4.3 Regression] ICE on valid C++ virtual template static member in anonymous namespace
-- jason at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2007-08-17 09:29:10 |2007-09-23 18:22:01 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094
[Bug c++/33094] [4.2/4.3 Regression] ICE on valid C++ virtual template static member in anonymous namespace
--- Comment #5 from pinskia at gcc dot gnu dot org 2007-09-07 00:28 --- *** Bug 33322 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||tim at klingt dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094
[Bug c++/33094] [4.2/4.3 Regression] ICE on valid C++ virtual template static member in anonymous namespace
--- Comment #4 from ian at airs dot com 2007-09-05 06:03 --- I haven't looked further at this since this message: http://gcc.gnu.org/ml/gcc-patches/2007-08/msg01166.html Testing DECL_EXTERNAL_LINKAGE_P does not make any difference: the compiler still crashes. The decl in question is var_decl 0xb7d3b0b8 c type integer_type 0xb7d378dc int readonly type_6 SI size integer_cst 0xb7c55620 constant invariant 32 unit size integer_cst 0xb7c5540c constant invariant 4 align 32 symtab 0 alias set -1 canonical type 0xb7d378dc precision 32 min integer_cst 0xb7c555cc -2147483648 max integer_cst 0xb7c555e8 2147483647 readonly used private static tree_1 tree_2 tree_3 nonlocal decl_3 decl_5 decl_6 SI file /home/iant/foo1.cc line 8 size integer_cst 0xb7c55620 32 unit size integer_cst 0xb7c5540c 4 align 32 context record_type 0xb7d37ca8 A initial integer_cst 0xb7c55bd0 0 template-info 0xb7d3c444 chain type_decl 0xb7d37d80 A -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094
[Bug c++/33094] [4.2/4.3 Regression] ICE on valid C++ virtual template static member in anonymous namespace
--- Comment #3 from mmitchel at gcc dot gnu dot org 2007-09-05 01:00 --- Ian, I know that we talked about this on the mailing list at one point. Did this get resolved? Does changing the assert to check DECL_EXTERNAL_LINKAGE_P instead of DECL_EXTERNAL help? -- mmitchel at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094
[Bug c++/33094] [4.2/4.3 Regression] ICE on valid C++ virtual template static member in anonymous namespace
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-17 09:29 --- /* 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)); Confirmed. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||ice-on-valid-code Last reconfirmed|-00-00 00:00:00 |2007-08-17 09:29:10 date|| Summary|ICE on valid C++ virtual|[4.2/4.3 Regression] ICE on |template static member in |valid C++ virtual template |namespace |static member in anonymous ||namespace Target Milestone|--- |4.2.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094
[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
[Bug c++/33094] [4.2/4.3 Regression] ICE on valid C++ virtual template static member in anonymous namespace
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Target Milestone|--- |4.2.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094