This is the mail archive of the gcc@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++ 2.97, warning: ICE: would have deleted prologue/epilogue insn





Hi,
when trying to compile the debian advanced package tool "apt" (0.3.19) on Linux/Mips with
glibc 2.1.95, gcc 2.97 as of 20001006 and binutils of the same age i get this interesting output.

When not trying to compile with -O2 this goes through without a problem ...


Reading specs from /usr/lib/gcc-lib/mips-unknown-linux-gnu/2.97/specs
Configured with:  --disable-shared --without-nls --prefix=/usr
gcc version 2.97 20001006 (experimental)
 /usr/lib/gcc-lib/mips-unknown-linux-gnu/2.97/cpp0 -lang-c++ -D__GNUG__=2 -v -MD test.d -D__GNUC__=2 -D__GNUC_MINOR__=97 -D__GNUC_PATCHLEVEL__=0 -DMIPSEB -D_MIPSEB -Dunix -Dmips -D_mips -DR3000 -D_R3000 -Dlinux -D__ELF__ -D__PIC__ -D__pic__ -D__MIPSEB__ -D_MIPSEB -D__unix__ -D__mips__ -D__mips__ -D__R3000__ -D_R3000 -D__linux__ -D__ELF__ -D__PIC__ -D__pic__ -D__MIPSEB -D__unix -D__mips -D__mips -D__R3000 -D__linux -Asystem(posix) -Acpu(mips) -Amachine(mips) -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -g -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS1 -D_ABIN32=2 -D_MIPS_SIM=_ABIN32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 -U__mips -D__mips -U__mips64 -D__PIC__ -D__pic__ -DHAVE_CONFIG_H -D_REENTRANT -DPIC test.cc test.ii
GNU CPP version 2.97 20001006 (experimental) (cpplib) (MIPS GNU/Linux with ELF)
ignoring nonexistent directory "/usr/mips-unknown-linux-gnu/include"
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++-3
 /usr/include
 /usr/lib/gcc-lib/mips-unknown-linux-gnu/2.97/include
End of search list.
 /usr/lib/gcc-lib/mips-unknown-linux-gnu/2.97/cc1plus -lang-c++ test.ii -quiet -dumpbase test.cc -g -O2 -version -fPIC -o test.s
GNU C++ version 2.97 20001006 (experimental) (mips-unknown-linux-gnu) compiled by GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release).
/usr/include/g++-3/stl_uninitialized.h: In function `_ForwardIter 
   __uninitialized_copy_aux(_InputIter, _InputIter, _ForwardIter, __false_type) 
   [with _InputIter = string *, _ForwardIter = string *]':
/usr/include/g++-3/stl_uninitialized.h:71:   instantiated from `__uninitialized_copy(_InputIter, _InputIter, _ForwardIter, _Tp *) [with _InputIter = string *, _ForwardIter = string *, _Tp = string]'
/usr/include/g++-3/stl_vector.h:78:   instantiated from `vector<_Tp, _Alloc>::_M_insert_aux(_Tp *, const _Tp &) [with _Tp = string, _Alloc = allocator<string>]'
/usr/include/g++-3/stl_vector.h:325:   instantiated from `vector<_Tp, _Alloc>::push_back(const _Tp &) [with _Tp = string, _Alloc = allocator<string>]'
test.cc:45:   instantiated from here
/usr/include/g++-3/stl_uninitialized.h:59: warning: ICE: would have deleted 
   prologue/epilogue insn
(insn 308 267 310 (set (reg:SI 7 a3)
        (ashiftrt:SI (reg:SI 7 a3)
            (const_int 24 [0x18]))) -1 (nil)
    (nil))
 /usr/lib/gcc-lib/mips-unknown-linux-gnu/2.97/../../../../mips-unknown-linux-gnu/bin/as -EB -O2 -g -v -KPIC -o test.o test.s
GNU assembler version 2.10.91 (mips-unknown-linux-gnu) using BFD version 2.10.91


I stripped down the source as far as i could without knowing c++ too overly
well ... 


#include <ctype.h>
#include <vector.h>
#include <string.h>
#include <string>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>

bool ReadMessages(int Fd, vector<string> &List)
{
   char Buffer[4000];
   char *End = Buffer;
   
   while (1)
   {
      int Res = read(Fd,End,sizeof(Buffer) - (End-Buffer));
      if (Res < 0 && errno == EINTR)
	 continue;
      
      // Process is dead, this is kind of bad..
      if (Res == 0)
	 return false;
      
      // No data
      if (Res <= 0)
	 return true;

      End += Res;
      
      // Look for the end of the message
      for (char *I = Buffer; I + 1 < End; I++)
      {
	 if (I[0] != '\n' || I[1] != '\n')
	    continue;
	 
	 // Pull the message out
	 string Message(Buffer,0,I-Buffer);

	 // Fix up the buffer
	 for (; I < End && *I == '\n'; I++);
	 End -= I-Buffer;	 
	 memmove(Buffer,I,End-Buffer);
	 I = Buffer;
	 
	 List.push_back(Message);
      }
      if (End == Buffer)
	 return true;
   }   
}


Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?


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