public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
@ 2005-10-31 2:10 ` mmitchel at gcc dot gnu dot org
2005-10-31 16:10 ` bangerth at dealii dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31 2:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from mmitchel at gcc dot gnu dot org 2005-10-31 02:10 -------
Leaving as P2; we should try to fix this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
2005-10-31 2:10 ` [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter mmitchel at gcc dot gnu dot org
@ 2005-10-31 16:10 ` bangerth at dealii dot org
2005-11-02 21:34 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2005-10-31 16:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from bangerth at dealii dot org 2005-10-31 16:10 -------
(In reply to comment #8)
> > How do you generate all these snippets?
>
> By sheer determination. I pick some topic like pointers-to-members or
> destructors for example and try to find some bugs. Over time you get
> a good feeling for GCC's weaknesses (templates for example). Well,
> okay, maybe those code snippets are "obnoxious".
By the way (should have written this a long time ago): My experience with
things like this is that you should probably save all the snippets you create,
even if they didn't crash the compiler in any interesting way (i.e. worked
just fine). If we ever want to have a comprehensive testsuite, then these
are the pieces that you would want in there.
Of course, getting the gcc folks to accept a thousand small programs that
just test small parts of the language is going to be harder than proposing
a single testcase that shows that a particular patch fixed a particular bug,
but I think it would be worth while.
(For example, if we had had testcases that had stresses static template
members in all their aspects, we would have had a dozen or so regression
reports less lately... :-)
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
2005-10-31 2:10 ` [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter mmitchel at gcc dot gnu dot org
2005-10-31 16:10 ` bangerth at dealii dot org
@ 2005-11-02 21:34 ` mmitchel at gcc dot gnu dot org
2005-11-02 21:35 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-02 21:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from mmitchel at gcc dot gnu dot org 2005-11-02 21:34 -------
Subject: Bug 19253
Author: mmitchel
Date: Wed Nov 2 21:34:51 2005
New Revision: 106398
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106398
Log:
PR c++/19253
* parser.c (cp_parser_postfix_expression): Use
cp_parser_elaborated_type_specifier to handle typename-types in
functional casts.
(cp_parser_enclosed_argument_list): Skip ahead to the end of the
template argument list if the closing ">" is not found.
PR c++/19253
* g++.dg/parse/typename8.C: Compile with -w -fpermissive.
* g++.dg/parse/typename9.C: New test.
* g++/dg/parse/typename10.C: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/parse/typename10.C
trunk/gcc/testsuite/g++.dg/parse/typename9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/parse/typename8.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2005-11-02 21:34 ` mmitchel at gcc dot gnu dot org
@ 2005-11-02 21:35 ` mmitchel at gcc dot gnu dot org
2005-11-02 21:50 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-02 21:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from mmitchel at gcc dot gnu dot org 2005-11-02 21:35 -------
Subject: Bug 19253
Author: mmitchel
Date: Wed Nov 2 21:35:46 2005
New Revision: 106399
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106399
Log:
PR c++/19253
* parser.c (cp_parser_postfix_expression): Use
cp_parser_elaborated_type_specifier to handle typename-types in
functional casts.
(cp_parser_enclosed_argument_list): Skip ahead to the end of the
template argument list if the closing ">" is not found.
PR c++/19253
* g++.dg/parse/typename8.C: Compile with -w -fpermissive.
* g++.dg/parse/typename9.C: New test.
* g++/dg/parse/typename10.C: Likewise.
Added:
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/parse/typename10.C
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/parse/typename9.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/testsuite/ChangeLog
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/parse/typename8.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2005-11-02 21:35 ` mmitchel at gcc dot gnu dot org
@ 2005-11-02 21:50 ` mmitchel at gcc dot gnu dot org
2005-11-15 19:14 ` reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-02 21:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from mmitchel at gcc dot gnu dot org 2005-11-02 21:50 -------
Fixed in 4.0.3.
--
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=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2005-11-02 21:50 ` mmitchel at gcc dot gnu dot org
@ 2005-11-15 19:14 ` reichelt at gcc dot gnu dot org
2005-11-15 19:19 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-11-15 19:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from reichelt at gcc dot gnu dot org 2005-11-15 19:14 -------
Subject: Bug 19253
Author: reichelt
Date: Tue Nov 15 19:14:21 2005
New Revision: 107037
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107037
Log:
PR c++/19253
PR c++/22172
Backport from mainline:
2005-11-02 Mark Mitchell <mark@codesourcery.com>
* parser.c (cp_parser_postfix_expression): Use
cp_parser_elaborated_type_specifier to handle typename-types in
functional casts.
(cp_parser_enclosed_argument_list): Skip ahead to the end of the
template argument list if the closing ">" is not found.
Backport from mainline:
2005-11-02 Mark Mitchell <mark@codesourcery.com>
PR c++/19253
* g++.dg/parse/typename10.C: New test.
Backport from mainline:
2005-10-08 James A. Morrison <phython@gcc.gnu.org>
PR c++/22172
* g++.dg/parse/crash30.C: New test.
Added:
branches/gcc-3_4-branch/gcc/testsuite/g++.dg/parse/crash30.C
branches/gcc-3_4-branch/gcc/testsuite/g++.dg/parse/typename10.C
Modified:
branches/gcc-3_4-branch/gcc/cp/ChangeLog
branches/gcc-3_4-branch/gcc/cp/parser.c
branches/gcc-3_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2005-11-15 19:14 ` reichelt at gcc dot gnu dot org
@ 2005-11-15 19:19 ` reichelt at gcc dot gnu dot org
2005-11-21 15:56 ` pinskia at gcc dot gnu dot org
2006-01-27 16:31 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-11-15 19:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from reichelt at gcc dot gnu dot org 2005-11-15 19:19 -------
Now also fixed on the 3.4 branch.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.3 |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2005-11-15 19:19 ` reichelt at gcc dot gnu dot org
@ 2005-11-21 15:56 ` pinskia at gcc dot gnu dot org
2006-01-27 16:31 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-21 15:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from pinskia at gcc dot gnu dot org 2005-11-21 15:56 -------
*** Bug 24967 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |christoph dot pesch at
| |siemens dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2005-11-21 15:56 ` pinskia at gcc dot gnu dot org
@ 2006-01-27 16:31 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-27 16:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from pinskia at gcc dot gnu dot org 2006-01-27 16:31 -------
*** Bug 25997 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |holt-gcc at gholt dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19253] New: [3.4/4.0 regression] bad error message / ICE for invalid template parameter
@ 2005-01-04 14:31 reichelt at gcc dot gnu dot org
2005-05-19 17:48 ` [Bug c++/19253] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-01-04 14:31 UTC (permalink / raw)
To: gcc-bugs
The following invalid testcase causes an ICE on mainline:
=================================
namespace N {}
template<typename> struct A
{
A<typename N::X<int> > a;
};
=================================
bug.cc:5: error: 'X' in namespace 'N' does not name a type
bug.cc:5: internal compiler error: in make_typename_type, at cp/decl.c:2685
Please submit a full bug report, [etc.]
Mark, the ICE was introduced by your patch for PR18738:
http://gcc.gnu.org/ml/gcc-cvs/2004-12/msg00592.html
Before we got a regression w.r.t. the error message.
Right before the ICE we had:
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: missing `>' to terminate the template argument list
bug.cc:5: error: template argument 1 is invalid
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: missing `>' to terminate the template argument list
bug.cc:5: error: template argument 1 is invalid
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: missing `>' to terminate the template argument list
bug.cc:5: error: template argument 1 is invalid
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: missing `>' to terminate the template argument list
bug.cc:5: error: template argument 1 is invalid
bug.cc:5: error: `A< <template-parameter-1-1> >' is not a template
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: no class template named `X' in `N'
bug.cc:5: error: expected `(' before '<' token
bug.cc:5: error: expected primary-expression before "int"
bug.cc:5: error: expected `>' before "int"
bug.cc:5: error: missing `>' to terminate the template argument list
bug.cc:5: error: expected unqualified-id before '>' token
(This is probably a new record, 10 times the same message!)
Alexandre, this was introduced by your patch for PR18757:
http://gcc.gnu.org/ml/gcc-cvs/2004-12/msg00382.html
Before we only had the following error message:
bug.cc:5: error: 'X' in namespace 'N' does not name a type
bug.cc:5: error: no class template named 'X' in 'N'
bug.cc:5: error: missing '>' to terminate the template argument list
bug.cc:5: error: template argument 1 is invalid
bug.cc:5: error: expected unqualified-id before '>' token
which is much better.
While the ICE is only present on mainline (because the patch for
PR18738 has not been backported yet) the error message regression
also affects the 3.4 branch.
--
Summary: [3.4/4.0 regression] bad error message / ICE for invalid
template parameter
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, diagnostic
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: aoliva at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
dot org,mmitchel at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19253
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-01-27 16:31 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-19253-1771@http.gcc.gnu.org/bugzilla/>
2005-10-31 2:10 ` [Bug c++/19253] [3.4/4.0/4.1 regression] bad error message / ICE for invalid template parameter mmitchel at gcc dot gnu dot org
2005-10-31 16:10 ` bangerth at dealii dot org
2005-11-02 21:34 ` mmitchel at gcc dot gnu dot org
2005-11-02 21:35 ` mmitchel at gcc dot gnu dot org
2005-11-02 21:50 ` mmitchel at gcc dot gnu dot org
2005-11-15 19:14 ` reichelt at gcc dot gnu dot org
2005-11-15 19:19 ` reichelt at gcc dot gnu dot org
2005-11-21 15:56 ` pinskia at gcc dot gnu dot org
2006-01-27 16:31 ` pinskia at gcc dot gnu dot org
2005-01-04 14:31 [Bug c++/19253] New: [3.4/4.0 " reichelt at gcc dot gnu dot org
2005-05-19 17:48 ` [Bug c++/19253] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-07-22 21:18 ` pinskia at gcc dot gnu dot org
2005-09-06 15:27 ` reichelt at gcc dot gnu dot org
2005-09-27 16:24 ` mmitchel 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).