IO errors in g++

Juan Antonio Magallon magallon@shiva.cps.unizar.es
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 dummy.cc
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 rufus.w3.org, with just a pair of signal11's).

gdb says:
...
Program terminated with signal 4, Illegal instruction.
Reading symbols from /usr/lib/libstdc++-libc6.1-2.so.3...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#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
(gdb)

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

More info:
werewolf:~/dev/kk> g++ -v --save-temps dummy.cc
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.cc dummy.ii
GNU CPP version 2.95.1 19990816/Linux (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/../../../../include/g++-3
 /usr/local/include
 /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/include
 /usr/include
 End of search list.
 The following default directories have been omitted from the search path:
  /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/../../../../i386-redhat-linux/include
  End of omitted list.
/usr/lib/gcc-lib/i386-redhat-linux/2.95.1/cc1plus dummy.ii -quiet
   -dumpbase dummy.cc -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 2.9.1.0.24
		 /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/collect2 -m elf_i386
		 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o
		 /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/crtbegin.o
		 -L/usr/lib/gcc-lib/i386-redhat-linux/2.95.1
		 -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             mailto:magallon@ivo.cps.unizar.es
Grupo de Informatica Grafica Avanzada             http://giga.cps.unizar.es
Tlf: 34-976-761939,1916 - Fax: 34-976-762111


More information about the Gcc-bugs mailing list