This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/10555: [3.3/3.4 regression] ICE on undefined template argument


>Number:         10555
>Category:       c++
>Synopsis:       [3.3/3.4 regression] ICE on undefined template argument
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 20:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Volker Reichelt
>Release:        3.1 - 3.4-20030402
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
Consider the following code snippet:

-------------------------------snip here------------------------
template <typename> struct A
{
    template <typename> struct B;
};

template <typename T> struct C
{
    typedef typename A<T>::template B<U> X; // U is undefined
};

C<void> c;
-------------------------------snip here------------------------

PR8582D.cc:8: error: `U' has not been declared
PR8582D.cc: In instantiation of `C<void>':
PR8582D.cc:11:   instantiated from here
PR8582D.cc:8: error: template argument 1 is invalid
PR8582D.cc:8: internal compiler error: tree check: expected tree_vec, have 
   error_mark in check_instantiated_args, at cp/pt.c:8403
Please submit a full bug report, [etc.]

This error recovery problem affects mainline, 3.3 branch and the 3.2 branch
(at least if configured with --enable-checking).
So it's a regression from 3.0.x.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]