[Bug c++/47874] New: Multiple Inheritance - Virtual Function - Segfault

isahib at xtra dot co.nz gcc-bugzilla@gcc.gnu.org
Thu Feb 24 07:14:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47874

           Summary: Multiple Inheritance - Virtual Function - Segfault
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: isahib@xtra.co.nz


Created attachment 23449
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23449
gcc-4.6 -save-temps output, demos bug

The attached BugReport.ii demos a reproducible bug in a complex multiple
inheritance scheme. When the virtual function BugReport::Tier1::Object::Print
is overridden and called in a derived class then the program segfaults.

ggc-4.6 -v
==========
Using built-in specs.
COLLECT_GCC=gcc-4.6
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6-20110216-1'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold
--enable-objc-gc --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.0 20110216 (experimental) [trunk revision 170225] (Debian
4.6-20110216-1)

gcc-4.6 build command line
==========================
-std=c++0x -Wall -Wextra -pedantic -g -save-temps

Shell output
============
Segmentation fault

Gdb output
==========
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()



More information about the Gcc-bugs mailing list