Bug 9528

Summary: [3.4 regression] [New parser] ICE in validate_nonmember_using_decl with illegal using-declaration
Product: gcc Reporter: Volker Reichelt <reichelt>
Component: c++Assignee: Kriang Lerdsuwanakij <lerdsuwa>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P3 Keywords: ice-on-invalid-code
Version: 3.4.0   
Target Milestone: 3.4.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

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