Bug 9528 - [3.4 regression] [New parser] ICE in validate_nonmember_using_decl with illegal using-declaration
Summary: [3.4 regression] [New parser] ICE in validate_nonmember_using_decl with illeg...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P3 normal
Target Milestone: 3.4.0
Assignee: Kriang Lerdsuwanakij
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2003-01-31 18:06 UTC by Volker Reichelt
Modified: 2004-01-17 04:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2003-01-31 18:06:00 UTC
The following code causes an ICE when compiled with the new parser:

---------------------snip here-------------------
template <typename T> struct A
{
    void foo() { using T::X; }
};
---------------------snip here-------------------

The error message is:

bug.cc: In member function `void A<T>::foo()':
bug.cc:3: internal compiler error: in validate_nonmember_using_decl, at 
   cp/decl2.c:4152
Please submit a full bug report, [etc.]

Since we get a sensible error message with the 3.2/3.3 branch,
this is a regression.

Release:
gcc 3.4-20040127

Environment:
i686-pc-linux-gnu

How-To-Repeat:
g++ -c
Comment 1 Wolfgang Bangerth 2003-02-01 20:56:32 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed. Broke somewhere here (so probably with the new
    parser):
    
    regression/test> ../bin/gcc-2002-12-25/bin/c++ -c test.ii
    test.ii: In member function `void A<T>::foo()':
    test.ii:3: error: parse error before `;' token
    regression/test> ../bin/gcc-2003-01-05/bin/c++ -c test.ii
    test.ii: In member function `void A<T>::foo()':
    test.ii:3: internal compiler error: in validate_nonmember_using_decl, at
       cp/decl2.c:4292
Comment 2 Kriang Lerdsuwanakij 2003-04-30 16:47:02 UTC
Responsible-Changed-From-To: unassigned->lerdsuwa
Responsible-Changed-Why: Working on a fix.
Comment 3 Kriang Lerdsuwanakij 2003-04-30 17:54:22 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed