GCC 2.95.2 bug report
Rodney Freier
rfreier@titan.csw.L-3com.com
Tue Apr 4 11:10:00 GMT 2000
This is the simplest example I can find of a bug we
ran into with GCC 2.95.2 involving pointers to member
functions with nested classes. Although this code
compiles and runs correctly under GCC2.8.1 and EGCS 2.91.66,
GCC 2.95.2 produces an exectuable which seg-faults at the
point of calling a member function through a pointer.
The system used:
Linux titan 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686
unknown
The compiler version:
GNU C++ version 2.95.2 19991024 (release) (i686-pc-linux-gnu) compiled
by GNU C
version 2.95.2 19991024 (release).
The file MAKELOG contains the results of:
gmake >& MAKELOG
The correct output is as follows (from a 2.91.66 compile):
Base::Diff constructor: Address of IBFI = 0x8080778
Derived constructor: Address of Derived Diff = 0x8080760
Main: Address of ibfi = 0x8080778
called Derived::Diff::write(0x20)
The incorrect output is as follows (from a 2.95.2 compile):
Base::Diff constructor: Address of IBFI = 0x8080fd8
Derived constructor: Address of Derived Diff = 0x8080fc0
Main: Address of ibfi = 0x8080fd8
Segmentation fault
Please feel free to contact me if you need any additional
information.
Rod Freier
rfreier@csw.L-3com.com
L-3 Communications, Systems West
Salt Lake City, UT
More information about the Gcc-bugs
mailing list