This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/464: ICE 272 on incorrect STL iterator initialization code
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/464: ICE 272 on incorrect STL iterator initialization code
- From: perdita at mail dot utexas dot edu
- Date: 11 Aug 2000 07:53:30 -0000
- Reply-To: perdita at mail dot utexas dot edu
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, jason at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, perdita@mail.utexas.edu
>Number: 464
>Category: c++
>Synopsis: ICE 272 on incorrect STL iterator initialization code
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Fri Aug 11 00:56:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Wei-shi Tsai
>Release: gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>Organization:
>Environment:
Pentium III - 450 Mhz, running Slackware Linux 7.0 with Linux Kernel 2.2.16. 128 MB of RAM with 8MB taken by video chipset.
>Description:
I wrote incorrect code (writing a function as a variable) to initialize a iterator for a vector. Instead of a syntax error, the compiler says:
crash.cpp: In function `int main(...)':
crash.cpp:14: Internal compiler error 272.
crash.cpp:14: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
crash.cpp:14: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
>How-To-Repeat:
/*
** crash.cpp - Crash the compiler!
*/
#include <iostream.h>
#include <vector>
vector <short> Test;
void main()
{
Test.resize(64);
Test.clear();
// The next line generates ICE 272. This is incorrect code.
vector<short>::iterator<short> ShortIterator = Test.begin;
cout << "The program has ended." << endl;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: