public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/10555: [3.3/3.4 regression] ICE on undefined template argument
@ 2003-04-29 20:06 reichelt
  0 siblings, 0 replies; 2+ messages in thread
From: reichelt @ 2003-04-29 20:06 UTC (permalink / raw)
  To: gcc-gnats


>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:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/10555: [3.3/3.4 regression] ICE on undefined template argument
@ 2003-04-29 21:47 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-04-29 21:47 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, reichelt

Synopsis: [3.3/3.4 regression] ICE on undefined template argument

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Tue Apr 29 21:47:27 2003
State-Changed-Why:
    Confirmed, but I don't think it's a regression: in 3.0 I
    get "confused by earlier messages" and in 2.95 an ICE:
    
    g/x> /home/bangerth/bin/gcc-3.0.4/bin/c++ -c x.cc
    x.cc: In instantiation of `C<void>':
    x.cc:11:   instantiated from here
    x.cc:8: type/value mismatch at argument 1 in template parameter list for
       `template<{template default argument error}> template<{template default
       argument error}> struct A<<anonymous template type parameter> >::B'
    x.cc:8:   expected a type, got `U'
    x.cc:8: confused by earlier errors, bailing out
    g/x>
    g/x>
    g/x> c++ -c x.cc
    x.cc: In instantiation of `A<void>':
    x.cc:8:   instantiated from `C<void>'
    x.cc:11:   instantiated from here
    x.cc:8: Internal compiler error.
    x.cc:8: Please submit a full bug report.
    x.cc:8: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
    
    What do you think?
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10555


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-29 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-29 20:06 c++/10555: [3.3/3.4 regression] ICE on undefined template argument reichelt
2003-04-29 21:47 bangerth

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).