public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5756: ICE on bad typedef
@ 2002-02-23 15:25 rodrigc
0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2002-02-23 15:25 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jcab, nobody
Synopsis: ICE on bad typedef
State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sat Feb 23 15:20:34 2002
State-Changed-Why:
Problem reproduced with gcc 3.0.4.
With gcc 3.1, no ICE occurs, but the following compilation
error occurs:
bug1.cpp:13: `template<class IteratorT> class
KK::grammar_filter<KK::cpp_lexer_phase_1>::iterator' used without template
parameters
bug1.cpp:13: using `typename' outside of template
bug1.cpp:13: ISO C++ forbids declaration of `iterator' with no type
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5756
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/5756: ICE on bad typedef
@ 2002-02-23 1:06 jcab
0 siblings, 0 replies; 2+ messages in thread
From: jcab @ 2002-02-23 1:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 5756
>Category: c++
>Synopsis: ICE on bad typedef
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Sat Feb 23 00:06:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Juan Carlos Arevalo-Baeza
>Release: 3.0.3
>Organization:
>Environment:
CygWin
>Description:
It looks like, in some cases, defining a typedef of a template without providing template parameters, ICEs the compiler.
Below, there's a tiny code snippet that shows the problem.
>How-To-Repeat:
Just compile the following program:
---
namespace KK {
template < typename GrammarT >
struct grammar_filter {
template < typename IteratorT >
class iterator {};
};
struct cpp_lexer_phase_1 {
};
typedef typename grammar_filter<cpp_lexer_phase_1>::iterator
iterator;
}
---
I get:
$ g++ bug1.cpp -O2 -ftemplate-depth-50 -g -v -save-temps
Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.3/specs
Configured with: ../gcc-3.0.3/configure --enable-threads=win32
Thread model: win32
gcc version 3.0.3
/usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.3/cpp0.exe -lang-c++ -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D
__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=3 -D_X86_=1 -D_X86_=1 -Asystem=winnt -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amac
hine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__(
(__cdecl__)) -D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__i386__ -D__i
386 -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -isystem /usr/local/include -idirafter /usr/local/i686-pc-cygwin/include -idiraft
er /usr/include -idirafter /usr/local/i686-pc-cygwin/include/w32api -idirafter /usr/include/w32api bug1.cpp bug1.ii
ignoring nonexistent directory "/usr/local/i686-pc-cygwin/include"
ignoring nonexistent directory "/usr/local/i686-pc-cygwin/include/w32api"
GNU CPP version 3.0.3 (cpplib) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/include/g++-v3
/usr/local/include/g++-v3/i686-pc-cygwin
/usr/local/include/g++-v3/backward
/usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.3/include
/usr/include
/usr/include/w32api
End of search list.
/usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.3/cc1plus.exe -fpreprocessed bug1.ii -quiet -dumpbase bug1.cpp -g -O2 -version -ftemplate-depth-5
0 -o bug1.s
GNU CPP version 3.0.3 (cpplib) (80386, BSD syntax)
GNU C++ version 3.0.3 (i686-pc-cygwin)
compiled by GNU C version 3.0.3.
bug1.cpp:13: Internal error #2000.
bug1.cpp:13: Internal compiler error in make_typename_type, at cp/decl.c:5659
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>Fix:
The code is actually broken. Correct code seems to work OK.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-23 23:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-23 15:25 c++/5756: ICE on bad typedef rodrigc
-- strict thread matches above, loose matches on Subject: below --
2002-02-23 1:06 jcab
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).