public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration
@ 2006-06-08 15:29 reichelt at gcc dot gnu dot org
2006-06-08 15:31 ` [Bug c++/27961] " pinskia at gcc dot gnu dot org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-06-08 15:29 UTC (permalink / raw)
To: gcc-bugs
The following testcase causes an ICE on the 4.1 branch and mainline:
====================================
struct A
{
template<int> void foo(X);
};
====================================
bug.cc:7: error: 'X' was not declared in this scope
bug.cc:7: error: variable or field 'foo' declared void
bug.cc:7: internal compiler error: tree check: expected var_decl, have
field_decl in cp_finish_decl, at cp/decl.c:4933
Please submit a full bug report, [etc.]
This is a very recent regression, since GCC 4.1.1 is not affected.
Mark, your patch for PR 27819 seems to have caused this:
http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00198.html
--
Summary: [4.1/4.2 regression] ICE on invalid template declaration
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
@ 2006-06-08 15:31 ` pinskia at gcc dot gnu dot org
2006-06-15 23:52 ` mmitchel at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-08 15:31 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|normal |minor
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
2006-06-08 15:31 ` [Bug c++/27961] " pinskia at gcc dot gnu dot org
@ 2006-06-15 23:52 ` mmitchel at gcc dot gnu dot org
2006-07-17 3:25 ` mmitchel at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-15 23:52 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
2006-06-08 15:31 ` [Bug c++/27961] " pinskia at gcc dot gnu dot org
2006-06-15 23:52 ` mmitchel at gcc dot gnu dot org
@ 2006-07-17 3:25 ` mmitchel at gcc dot gnu dot org
2006-07-18 10:48 ` reichelt at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-17 3:25 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-07-17 3:25 ` mmitchel at gcc dot gnu dot org
@ 2006-07-18 10:48 ` reichelt at gcc dot gnu dot org
2006-08-12 21:28 ` janis at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-18 10:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from reichelt at gcc dot gnu dot org 2006-07-18 10:48 -------
Here's a testcase with a slightly different error message:
========================================
template<int> void f()(0);
========================================
bug.cc:1: error: function 'void f()' is initialized like a variable
bug.cc:1: internal compiler error: tree check: expected var_decl, have
function_decl in cp_finish_decl, at cp/decl.c:5083
Please submit a full bug report, [etc.]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-07-18 10:48 ` reichelt at gcc dot gnu dot org
@ 2006-08-12 21:28 ` janis at gcc dot gnu dot org
2006-08-14 19:06 ` reichelt at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-08-12 21:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from janis at gcc dot gnu dot org 2006-08-12 21:28 -------
A regression hunt on powerpc-linux using the testcase from the submitter's
description identified the following patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=114119
r114119 | mmitchel | 2006-05-25 20:18:26 +0000 (Thu, 25 May 2006)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-08-12 21:28 ` janis at gcc dot gnu dot org
@ 2006-08-14 19:06 ` reichelt at gcc dot gnu dot org
2006-09-23 16:28 ` lmillward at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-08-14 19:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from reichelt at gcc dot gnu dot org 2006-08-14 19:06 -------
Reproduced by Janis.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-08-14 19:06:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-08-14 19:06 ` reichelt at gcc dot gnu dot org
@ 2006-09-23 16:28 ` lmillward at gcc dot gnu dot org
2006-09-23 16:30 ` patchapp at dberlin dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-09-23 16:28 UTC (permalink / raw)
To: gcc-bugs
--
lmillward at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |lmillward at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-08-14 19:06:35 |2006-09-23 16:28:31
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-09-23 16:28 ` lmillward at gcc dot gnu dot org
@ 2006-09-23 16:30 ` patchapp at dberlin dot org
2006-10-12 20:03 ` lmillward at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: patchapp at dberlin dot org @ 2006-09-23 16:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from patchapp at dberlin dot org 2006-09-23 16:30 -------
Subject: Bug number PR c++/27961
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-09/msg01018.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-09-23 16:30 ` patchapp at dberlin dot org
@ 2006-10-12 20:03 ` lmillward at gcc dot gnu dot org
2006-10-12 20:06 ` lmillward at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-10-12 20:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from lmillward at gcc dot gnu dot org 2006-10-12 20:03 -------
Subject: Bug 27961
Author: lmillward
Date: Thu Oct 12 20:02:53 2006
New Revision: 117671
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117671
Log:
PR c++/27961
* decl.c (start_decl): Return error_mark_node if a
function is initialized like a variable.
(check_var_type): If a variable of field is declared void,
set the type to error_mark_node.
(grokdeclarator): Check the return type of check_var_type.
* class.c (finish_struct_1): Robustify.
* g++.dg/template/crash60.C: New test.
* g++.dg/other/large-size-array.C: Adjust error markers.
* g++.dg/parse/crash27.C: Likewise.
* g++.dg/template/crash1.C: Likewise.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/other/large-size-array.C
trunk/gcc/testsuite/g++.dg/parse/crash27.C
trunk/gcc/testsuite/g++.dg/template/crash1.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1/4.2 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (8 preceding siblings ...)
2006-10-12 20:03 ` lmillward at gcc dot gnu dot org
@ 2006-10-12 20:06 ` lmillward at gcc dot gnu dot org
2006-10-12 20:07 ` [Bug c++/27961] [4.1 " lmillward at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-10-12 20:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from lmillward at gcc dot gnu dot org 2006-10-12 20:06 -------
Subject: Bug 27961
Author: lmillward
Date: Thu Oct 12 20:06:36 2006
New Revision: 117672
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117672
Log:
PR c++/27961
* g++.dg/template/crash60.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/crash60.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (9 preceding siblings ...)
2006-10-12 20:06 ` lmillward at gcc dot gnu dot org
@ 2006-10-12 20:07 ` lmillward at gcc dot gnu dot org
2006-12-11 21:00 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-10-12 20:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from lmillward at gcc dot gnu dot org 2006-10-12 20:06 -------
Fixed on mainline.
--
lmillward at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1/4.2 regression] ICE on |[4.1 regression] ICE on
|invalid template declaration|invalid template declaration
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (10 preceding siblings ...)
2006-10-12 20:07 ` [Bug c++/27961] [4.1 " lmillward at gcc dot gnu dot org
@ 2006-12-11 21:00 ` reichelt at gcc dot gnu dot org
2007-02-14 9:27 ` mmitchel at gcc dot gnu dot org
2008-07-04 15:36 ` jsm28 at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-12-11 21:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from reichelt at gcc dot gnu dot org 2006-12-11 21:00 -------
> Fixed on mainline.
Alas this is only partially true:
Although the original testcase is indeed fixed on mainline (and 4.2 branch),
the following variant (which only differs in the return type of the template
function) still crashes:
====================================
struct A
{
template<int> int foo(X);
};
====================================
I'll open a new PR for this failure.
Btw, the testcase from comment #1 is also fixed on the 4.1 branch
(with "void" or "int" as return type).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (11 preceding siblings ...)
2006-12-11 21:00 ` reichelt at gcc dot gnu dot org
@ 2007-02-14 9:27 ` mmitchel at gcc dot gnu dot org
2008-07-04 15:36 ` jsm28 at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:27 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/27961] [4.1 regression] ICE on invalid template declaration
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
` (12 preceding siblings ...)
2007-02-14 9:27 ` mmitchel at gcc dot gnu dot org
@ 2008-07-04 15:36 ` jsm28 at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 15:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jsm28 at gcc dot gnu dot org 2008-07-04 15:35 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail| |4.1.3
Known to work| |4.2.0
Resolution| |FIXED
Target Milestone|4.1.3 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27961
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-07-04 15:36 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-08 15:29 [Bug c++/27961] New: [4.1/4.2 regression] ICE on invalid template declaration reichelt at gcc dot gnu dot org
2006-06-08 15:31 ` [Bug c++/27961] " pinskia at gcc dot gnu dot org
2006-06-15 23:52 ` mmitchel at gcc dot gnu dot org
2006-07-17 3:25 ` mmitchel at gcc dot gnu dot org
2006-07-18 10:48 ` reichelt at gcc dot gnu dot org
2006-08-12 21:28 ` janis at gcc dot gnu dot org
2006-08-14 19:06 ` reichelt at gcc dot gnu dot org
2006-09-23 16:28 ` lmillward at gcc dot gnu dot org
2006-09-23 16:30 ` patchapp at dberlin dot org
2006-10-12 20:03 ` lmillward at gcc dot gnu dot org
2006-10-12 20:06 ` lmillward at gcc dot gnu dot org
2006-10-12 20:07 ` [Bug c++/27961] [4.1 " lmillward at gcc dot gnu dot org
2006-12-11 21:00 ` reichelt at gcc dot gnu dot org
2007-02-14 9:27 ` mmitchel at gcc dot gnu dot org
2008-07-04 15:36 ` jsm28 at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).