c++/332: Re: typename bug, gcc hangs (Internal compiler error)
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Sun Jun 18 11:16:00 GMT 2000
>Number: 332
>Category: c++
>Synopsis: typename bug, gcc hangs (Internal compiler error)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: analyzed
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Sun Jun 18 11:16:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Thomas =?iso-8859-1?Q?Fj=E6stad?= Hagelien
>Release: 2.95.2
>Organization:
>Environment:
>Description:
Original-Message-ID: <3948B6B4.64C9E911@matek.sintef.no>
Date: Thu, 15 Jun 2000 12:57:56 +0200
<Thomas.Hagelien@matek.sintef.no>
g++: Internal compiler error
Gcc-version: gcc version 2.95.2 19991024 (release)
uname -a : CYGWIN_NT-4.0 MTPC386 1.1.0(0.16/3/2) 1999-12-26
00:17:43 i686 unknown
Compiler options: g++ -Wall -o genfunc genfunc.cpp
source:
----------------------------------------------
// Generic function test
template<class T> T create(T val)
{
typename T::Y; // Should produce same error as
Y instance(val); // typename T::Y instance(val); ???
return instance;
}
int main()
{
create<int>(2);
return 0;
}
----------------------------------------------
This code should produce errors, but ends up in an infinite loop.
Breaking this loop (^C) gives the following message:
g++: Internal compiler error in `execute', at ../../gcc/gcc.c:2577
Please submit a full bug report.
See <URL: http://www.gnu.org/software/gcc/faq.html#bugreport > for
instructions.
Sincerely
Thomas Fjæstad Hagelien
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list