[Bug c++/14804] New: [3.4 regression] initializing const data with reinterpret_cast-ed pointer-to-member function crashes
dbaron at dbaron dot org
gcc-bugzilla@gcc.gnu.org
Thu Apr 1 01:32:00 GMT 2004
This is somewhat similar to bug 12218 (which was fixed), but is a regression
between 20040105 and 20040311.
Initializing const data with a reinterpret_cast of a pointer-to-member virtual
function causes that const data to be emitted in the .rodata section (as it
should be) but causes initialization code to be generated to fill in the data.
(The reinterpret_cast is required for compilers other than gcc -- static_cast
works fine with gcc 3.4 and doesn't show the bug.)
This causes gcc to generate code that crashes on static initialization.
Testcase to be attached (simplified from nsEventListenerManager.cpp in Mozilla).
--
Summary: [3.4 regression] initializing const data with
reinterpret_cast-ed pointer-to-member function crashes
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dbaron at dbaron dot org
CC: bryner at brianryner dot com,gcc-bugs at gcc dot gnu dot
org
GCC build triplet: i686-gnu-linux-gnu
GCC host triplet: i686-gnu-linux-gnu
GCC target triplet: i686-gnu-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14804
More information about the Gcc-bugs
mailing list