[Bug c++/42394] New: pure virtual method called when compiling with "-fno-strict-aliasing -O"
Troy dot Runkel at mathworks dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 16 19:51:00 GMT 2009
The attached test case should produce no output when executed. However, when
compiled with the following command-line arguments...
g++ pure_virtual_function_test.cpp -fno-strict-aliasing -O -o fail_test
the test case produces the following output...
pure virtual method called
terminate called without an active exception
Aborted
The assembly code for MakeNvSsInportsNvIfNeeded shows that the call to
DescSysOutportSourceHandler::handleEachDescSys is passed the vtable for
DescSysOutportSourceHandler. However the call to
DescSysSelfLoopHandler::handleEachDescSys is passed the vtable for
DescSysIteratorNc instead of the vtable for DescSysSelfLoopHandler.
The output of "g++ -v" follows...
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../../../sources/gcc-4.3/configure
--prefix=/hub/3rdparty/internal/142814/glnxa64/gcc-4.3.4
--with-gmp=/sandbox/rjarrett/3p-gcc/3p/derived/glnxa64/gcc-4.3/gmp
--with-mpfr=/sandbox/rjarrett/3p-gcc/3p/derived/glnxa64/gcc-4.3/mpfr
--enable-languages=c,c++,fortran
--with-as=/hub/3rdparty/internal/142814/glnxa64/gcc-4.3.4/bin/as
--with-ld=/hub/3rdparty/internal/142814/glnxa64/gcc-4.3.4/bin/ld
--disable-multilib
Thread model: posix
gcc version 4.3.4 (GCC)
--
Summary: pure virtual method called when compiling with "-fno-
strict-aliasing -O"
Product: gcc
Version: 4.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Troy dot Runkel at mathworks dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42394
More information about the Gcc-bugs
mailing list