IO errors in g++

Juan Antonio Magallon
Tue Sep 7 17:48:00 GMT 1999

Somebody has experienced the same ?? I compile this simple program:
#include <stream.h>

int main()
    cout << 1 << endl;
	return 0;

and :
werewolf:~/dev/kk> g++ -o dummy
werewolf:~/dev/kk> dummy
Illegal instruction (core dumped)

My system is a 486, 48Mb, kernel 2.2.12 (compiled with the same version of
gcc, 2.95.1, rpms got at, with just a pair of signal11's).

gdb says:
Program terminated with signal 4, Illegal instruction.
Reading symbols from /usr/lib/
Reading symbols from /lib/
Reading symbols from /lib/
Reading symbols from /lib/
#0  0x4004146e in write_int ()
(gdb) bt
#0  0x4004146e in write_int ()
#1  0x4004169e in ostream::operator<< ()
#2  0x804887d in main ()
#3  0x40096cb3 in __libc_start_main (main=0x8048860 <main>, argc=1, 
    argv=0xbffffa84, init=0x80486c8 <_init>, fini=0x80488dc <_fini>, 
	rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffa7c)
	at ../sysdeps/generic/libc-start.c:78

kernel:		2.2.12
gcc-g++:	2.95.1
libstdc++:	2.95.1
binutils: tried with and
glibc: 		2.1.1

More info:
werewolf:~/dev/kk> g++ -v --save-temps
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/specs
gcc version 2.95.1 19990816/Linux (release)
 /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/cpp -lang-c++ -v -D__GNUC__=2
 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__
 -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux
 -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386
 -D__i386__ dummy.ii
GNU CPP version 2.95.1 19990816/Linux (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 End of search list.
 The following default directories have been omitted from the search path:
  End of omitted list.
/usr/lib/gcc-lib/i386-redhat-linux/2.95.1/cc1plus dummy.ii -quiet
   -dumpbase -version -o dummy.s
GNU C++ version 2.95.1 19990816/Linux (release) (i386-redhat-linux)
   compiled by GNU C version 2.95.1 19990816/Linux (release).
as -V -Qy -o dummy.o dummy.s
GNU assembler version 2.9.1 (i386-redhat-linux), using BFD version
		 /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/collect2 -m elf_i386
		 -dynamic-linker /lib/ /usr/lib/crt1.o /usr/lib/crti.o
		 -L/usr/i386-redhat-linux/lib dummy.o -lstdc++ -lm -lgcc -lc -lgcc
		 /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/crtend.o /usr/lib/crtn.o

Juan Antonio Magallon Lacarta   
Grupo de Informatica Grafica Avanzada   
Tlf: 34-976-761939,1916 - Fax: 34-976-762111

More information about the Gcc-bugs mailing list