public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
@ 2003-01-16 17:06 nathan
0 siblings, 0 replies; 7+ messages in thread
From: nathan @ 2003-01-16 17:06 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jjamison, nathan
Synopsis: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Thu Jan 16 09:06:05 2003
State-Changed-Why:
2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/9212
* parser.c (cp_parser_direct_declarator): If accepting either
abstract or named, the name must be an unqualified-id.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9212
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
@ 2003-01-16 19:46 Nathan Sidwell
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Sidwell @ 2003-01-16 19:46 UTC (permalink / raw)
To: nathan; +Cc: gcc-prs
The following reply was made to PR c++/9212; it has been noted by GNATS.
From: Nathan Sidwell <nathan@codesourcery.com>
To: Andreas Jaeger <aj@suse.de>
Cc: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, jjamison@cs.berkeley.edu,
gcc-gnats@gcc.gnu.org, nathan@gcc.gnu.org
Subject: Re: c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052
[gcc 3.2]
Date: Thu, 16 Jan 2003 19:40:13 +0000
Andreas Jaeger wrote:
>>Synopsis: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
>Shouldn't this go into 3.3 also?
no, it is a new-parser problem. The old parser maybe fell over too, but
that's not a regression, and this is one of those case that calls for major
backtracking anyway.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
@ 2003-01-16 19:36 Andreas Jaeger
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Jaeger @ 2003-01-16 19:36 UTC (permalink / raw)
To: nathan; +Cc: gcc-prs
The following reply was made to PR c++/9212; it has been noted by GNATS.
From: Andreas Jaeger <aj@suse.de>
To: nathan@codesourcery.com
Cc: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
jjamison@cs.berkeley.edu, gcc-gnats@gcc.gnu.org, nathan@gcc.gnu.org
Subject: Re: c++/9212: Internal compiler error in grokdeclarator, at
cp/decl.c:11052 [gcc 3.2]
Date: Thu, 16 Jan 2003 20:32:15 +0100
nathan@gcc.gnu.org writes:
> Synopsis: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
>
> State-Changed-From-To: analyzed->closed
> State-Changed-By: nathan
> State-Changed-When: Thu Jan 16 09:06:05 2003
> State-Changed-Why:
> 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
>
> PR c++/9212
> * parser.c (cp_parser_direct_declarator): If accepting either
> abstract or named, the name must be an unqualified-id.
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9212
Shouldn't this go into 3.3 also?
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
@ 2003-01-07 11:20 nathan
0 siblings, 0 replies; 7+ messages in thread
From: nathan @ 2003-01-07 11:20 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jjamison, nathan, nobody
Synopsis: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Tue Jan 7 03:20:50 2003
Responsible-Changed-Why:
fixing
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9212
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
@ 2003-01-07 11:15 nathan
0 siblings, 0 replies; 7+ messages in thread
From: nathan @ 2003-01-07 11:15 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jjamison, nobody
Synopsis: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Tue Jan 7 03:15:08 2003
State-Changed-Why:
this is a bug.
C c(A(A::e), B(B::f), A(A::e));
is being parsed as a function called c taking three
parameters, each of which has a parenthesized (& erroneous)
name. It is really a variable called c with an
'(expression-list)' initializer.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9212
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
@ 2003-01-07 10:56 Volker Reichelt
0 siblings, 0 replies; 7+ messages in thread
From: Volker Reichelt @ 2003-01-07 10:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/9212; it has been noted by GNATS.
From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, jjamison@cs.berkeley.edu
Cc:
Subject: Re: c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
Date: Tue, 7 Jan 2003 12:52:20 +0100
The ICE and the strange error messages when you remove some arguments
of the constructor of LaoSyllable are fixed with the new parser in gcc 3.4.
Here's a cleaned-up testcase:
-----------------------------snip here----------------------------
struct A
{
enum E { e };
A(E);
};
struct B
{
enum F { f };
B(F);
};
struct C
{
C(A, B, A);
};
C c(A(A::e), B(B::f), A(A::e));
-----------------------------snip here----------------------------
With gcc 3.4 20030106 I now get:
bug.cc:18: error: cannot use `::' in parameter declaration
bug.cc:18: error: cannot use `::' in parameter declaration
bug.cc:18: error: cannot use `::' in parameter declaration
I don't know whether these messages are correct - I also get them with
other compilers, but I don't know why. Especially since "A a(A::e);"
seems to be valid.
I just leave that to the language experts.
Regards,
Volker
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9212
^ permalink raw reply [flat|nested] 7+ messages in thread
* c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
@ 2003-01-07 6:06 jjamison
0 siblings, 0 replies; 7+ messages in thread
From: jjamison @ 2003-01-07 6:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 9212
>Category: c++
>Synopsis: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2]
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Mon Jan 06 22:06:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Johnathon Jamison
>Release: gcc version 3.2
>Organization:
>Environment:
[jjamison@acacia ~/lao/Lao_Parsing-bad-gcc]$ uname -a
Linux acacia.CS.Berkeley.EDU 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown
/usr/misc/pkg/gcc-3.2/bin/g++ -v
Configured with: ../gcc-3.2/configure --prefix=/usr/misc/pkg/gcc-3.2 --enable-languages=c,c++
>Description:
[jjamison@acacia ~/lao/Lao_Parsing-bad-gcc]$ /usr/misc/pkg/gcc-3.2/bin/g++ main.cpp
main.cpp: In function `int main()':
main.cpp:28: Internal compiler error in grokdeclarator, at cp/decl.c:11052
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>How-To-Repeat:
To repeat, compile the following:
---------- Begin Source ----------
class LaoConsonant {
public:
enum Consonant { GOH1, HOH3 };
LaoConsonant(enum Consonant c) {}
};
class LaoVowel {
public:
enum Vowel { SL_A };
LaoVowel(Vowel v) {}
};
class LaoSyllable {
private:
LaoConsonant first_consonant;
LaoVowel vowel;
LaoConsonant third_consonant;
public:
LaoSyllable(LaoConsonant c1, LaoVowel v, LaoConsonant c3) :
first_consonant(c1),
vowel(v),
third_consonant(c3) {}
};
int main(void) {
LaoSyllable love(LaoConsonant(LaoConsonant::HOH3),
LaoVowel(LaoVowel::SL_A),
LaoConsonant(LaoConsonant::GOH1));
}
----------- End Source -----------
I can not easily test this on a current development snapshot. I apologize. However, as this bug also exists in gcc version 2.95.3 20010315 (release), I do not think it has been fixed.
I can not find a smaller file that also generates this error. Further modifications of the file generate other odd errors.
>Fix:
Remove LaoConsonant::, LaoVowel::, and LaoConsonant:: from the declaration of love to fix it.
Interestingly, removing any one of the three fields from LaoSyllable causes the ICE to go away. It will then claim somthing along the lines of:
[jjamison@acacia ~/lao/Lao_Parsing-bad-gcc]$ /usr/misc/pkg/gcc-3.2/bin/g++ main.cpp
main.cpp: In function `int main()':
main.cpp:27: type `LaoConsonant' is not derived from type `LaoVowel'
main.cpp:27: confused by earlier errors, bailing out
This is clearly nonsense.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-01-16 19:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-16 17:06 c++/9212: Internal compiler error in grokdeclarator, at cp/decl.c:11052 [gcc 3.2] nathan
-- strict thread matches above, loose matches on Subject: below --
2003-01-16 19:46 Nathan Sidwell
2003-01-16 19:36 Andreas Jaeger
2003-01-07 11:20 nathan
2003-01-07 11:15 nathan
2003-01-07 10:56 Volker Reichelt
2003-01-07 6:06 jjamison
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).