This is the mail archive of the gcc-bugs@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]

c++/464: ICE 272 on incorrect STL iterator initialization code



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

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