* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
@ 2005-11-05 22:55 ` pinskia at gcc dot gnu dot org
2005-11-05 23:47 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-05 22:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-05 22:55 -------
Note I found this while reducing PR 24686
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
2005-11-05 22:55 ` [Bug c++/24687] " pinskia at gcc dot gnu dot org
@ 2005-11-05 23:47 ` pinskia at gcc dot gnu dot org
2005-11-05 23:51 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-05 23:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-11-05 23:47 -------
Backtrace:
#0 0x0813611e in decl_linkage (decl=0xb7ce1870) at
/home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/tree.c:2171
#1 0x080dc7f2 in retrofit_lang_decl (t=0xb7ce1870) at
/home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/lex.c:702
#2 0x080dc951 in build_lang_decl (code=CONST_DECL, name=0xb7d7eea0, type=0x0)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/lex.c:669
#3 0x0805db46 in build_enumerator (name=0xb7d7eea0, value=0x0,
enumtype=0xb7d7db24)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/decl.c:9992
#4 0x080ea4d3 in cp_parser_type_specifier (parser=0xb7d7ef70, flags=Variable
"flags" is not available.
)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:10223
#5 0x080ebac2 in cp_parser_decl_specifier_seq (parser=0xb7d7ef70,
flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0xbfec9750,
declares_class_or_enum=0xbfec97a4) at
/home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:7404
#6 0x080e8f95 in cp_parser_member_declaration (parser=0xb7d7ef70)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:13275
#7 0x080ea3e4 in cp_parser_type_specifier (parser=0xb7d7ef70, flags=Variable
"flags" is not available.
)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
2005-11-05 22:55 ` [Bug c++/24687] " pinskia at gcc dot gnu dot org
2005-11-05 23:47 ` pinskia at gcc dot gnu dot org
@ 2005-11-05 23:51 ` pinskia at gcc dot gnu dot org
2005-11-06 23:21 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-05 23:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-11-05 23:51 -------
Reduced as far as I can get it:
extern "C" {
template<typename _Tp> struct __is_pod {
enum {
__value = (sizeof(__gnu_internal::__test_type<_Tp>(0)))};
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-11-05 23:51 ` pinskia at gcc dot gnu dot org
@ 2005-11-06 23:21 ` pinskia at gcc dot gnu dot org
2005-11-06 23:23 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-06 23:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-11-06 23:21 -------
The CONST_DECL's type is null.
Seems like it should be error_mark_node instead.
Looking more into it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-11-06 23:21 ` pinskia at gcc dot gnu dot org
@ 2005-11-06 23:23 ` pinskia at gcc dot gnu dot org
2005-11-06 23:27 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-06 23:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-11-06 23:23 -------
Actually it should be NULL as it is in a template.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-11-06 23:23 ` pinskia at gcc dot gnu dot org
@ 2005-11-06 23:27 ` pinskia at gcc dot gnu dot org
2005-11-08 1:34 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-06 23:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-06 23:27 -------
I have a patch.
Caused by:
2005-07-14 Daniel Berlin <dberlin@dberlin.org>
Fix PR c++/22452
* tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-06 23:27:28
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-11-06 23:27 ` pinskia at gcc dot gnu dot org
@ 2005-11-08 1:34 ` pinskia at gcc dot gnu dot org
2005-11-14 6:01 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-08 1:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2005-11-08 01:34 -------
Actually I don't think my patch is the right one.
Here is the patch:
svn diff
Index: tree.c
===================================================================
--- tree.c (revision 106572)
+++ tree.c (working copy)
@@ -2168,7 +2168,12 @@ decl_linkage (tree decl)
/* Linkage of a CONST_DECL depends on the linkage of the enumeration
type. */
if (TREE_CODE (decl) == CONST_DECL)
- return decl_linkage (TYPE_NAME (TREE_TYPE (decl)));
+ {
+ /* If we are inside a template, the type will be null. */
+ if (!TREE_TYPE (decl))
+ return lk_external;
+ return decl_linkage (TYPE_NAME (TREE_TYPE (decl)));
+ }
/* Some things that are not TREE_PUBLIC have external linkage, too.
For example, on targets that don't have weak symbols, we make all
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-11-08 1:34 ` pinskia at gcc dot gnu dot org
@ 2005-11-14 6:01 ` mmitchel at gcc dot gnu dot org
2005-11-15 0:14 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-14 6:01 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-11-14 6:01 ` mmitchel at gcc dot gnu dot org
@ 2005-11-15 0:14 ` mmitchel at gcc dot gnu dot org
2005-11-15 0:15 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-15 0:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from mmitchel at gcc dot gnu dot org 2005-11-15 00:14 -------
Subject: Bug 24687
Author: mmitchel
Date: Tue Nov 15 00:14:28 2005
New Revision: 106908
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106908
Log:
PR c++/24687
* pt.c (check_explicit_specialization): Don't check for C linkage.
(push_template_decl_real): Likewise.
* parser.c (cp_parser_explicit_specialization): Check here.
(cp_parser_template_declaration_after_export): And here.
PR c++/24687
* g++.dg/template/crash43.C: New test.
Added:
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/template/crash43.C
Modified:
branches/gcc-4_0-branch/gcc/cp/ChangeLog
branches/gcc-4_0-branch/gcc/cp/parser.c
branches/gcc-4_0-branch/gcc/cp/pt.c
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-11-15 0:14 ` mmitchel at gcc dot gnu dot org
@ 2005-11-15 0:15 ` mmitchel at gcc dot gnu dot org
2005-11-15 0:18 ` mmitchel at gcc dot gnu dot org
2005-11-15 17:44 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-15 0:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from mmitchel at gcc dot gnu dot org 2005-11-15 00:15 -------
Subject: Bug 24687
Author: mmitchel
Date: Tue Nov 15 00:15:09 2005
New Revision: 106909
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106909
Log:
PR c++/24687
* pt.c (check_explicit_specialization): Don't check for C linkage.
(push_template_decl_real): Likewise.
* parser.c (cp_parser_explicit_specialization): Check here.
(cp_parser_template_declaration_after_export): And here.
PR c++/24687
* g++.dg/template/crash43.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/crash43.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-11-15 0:15 ` mmitchel at gcc dot gnu dot org
@ 2005-11-15 0:18 ` mmitchel at gcc dot gnu dot org
2005-11-15 17:44 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-15 0:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from mmitchel at gcc dot gnu dot org 2005-11-15 00:18 -------
Fixed in 4.1.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/24687] [4.1 Regression] ICE after error
2005-11-05 22:55 [Bug c++/24687] New: [4.1 Regression] ICE after error pinskia at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-11-15 0:18 ` mmitchel at gcc dot gnu dot org
@ 2005-11-15 17:44 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-15 17:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from mmitchel at gcc dot gnu dot org 2005-11-15 17:44 -------
Subject: Bug 24687
Author: mmitchel
Date: Tue Nov 15 17:44:28 2005
New Revision: 107030
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107030
Log:
PR c++/24687
* g++.dg/template/crash43.C: Remove duplicate copy of test.
Modified:
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/template/crash43.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24687
^ permalink raw reply [flat|nested] 13+ messages in thread