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

g++: Internal compiler error

egcs-2.91.13 generates an internal compiler error while compiling the
following file.  
The program works as expected with the previous egcs-snapshot egcs-2.91.12.

Peter Schmid

cat t2.C

template <class T>
void rev(const list<T>& L)
   list<T>::const_reverse_iterator rfirst(L.end());
   list<T>::const_reverse_iterator rlast(L.begin());

   while (rfirst != rlast)
      cout << *rfirst++ << endl;

int array [] = { 1, 5, 2, 3 };

int main ()
    list<int> v (array, array + 4);

cd /dos/peter/ftp/
g++ -v -o t2 t2.C -W -Wall 
Reading specs from /usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.13/specs
gcc version egcs-2.91.13 980308 (gcc-2.8.0 release)
 /usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.13/cpp -lang-c++ -v
-undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91
-D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix
-D__linux -Asystem(posix) -D__EXCEPTIONS -W -Wall -Di386
-Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -Asystem(unix)
-Acpu(i386) -Amachine(i386) t2.C t2.ii 
GNU CPP version egcs-2.91.13 980308 (gcc-2.8.0 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
End of search list.
 /usr/lib/gcc-lib/i386-pc-linux-gnulibc1/egcs-2.91.13/cc1plus t2.ii -quiet -dumpbase -W -Wall -version -o t2.s
GNU C++ version egcs-2.91.13 980308 (gcc-2.8.0 release)
(i386-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.13 980308
(gcc-2.8.0 release). 
t2.C: In function `void rev<int>(const class
list<int,__default_alloc_template<false,0> > &)': 
t2.C:7: Internal compiler error.
t2.C:7: Please submit a full bug report to `'.

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