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]

g++ 2.95.2: inlining of operator<< causes SIGSEGV with -O1


Hi,

this programm causes a SIGSEGV after compiled with g++ -O1 (g++ version
2.95.2).

#include <iostream.h>

struct A {};

inline ostream& operator<<(ostream& o, const A& a) { o << "A"; }

int main() {
	A a;
	cout << a << "\n";
	return 0;
}

Inlining the operator << and both calls to operator<<  are necessary for
triggering the SIGSEGV. I'm hoping that the new inlining fixes that
already.

Now my version numbers:

Reading specs from /usr/local/gcc-2.95.2/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)

GNU assembler version 2.9.1 (i486-linux), using BFD version 2.9.1.0.25

GNU ld version 2.9.1 (with BFD 2.9.1.0.25)

This is my /proc/version:

Linux version 2.2.13 (root@R97200553) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #6 Sat Nov 20 13:10:32 CET 1999

Ciao, Uli Kunitz

-- 
Ulrich Kunitz (gefm21@uudial.de)


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