public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14804] New: [3.4 regression] initializing const data with reinterpret_cast-ed pointer-to-member function crashes
@ 2004-04-01  1:32 dbaron at dbaron dot org
  2004-04-01  1:33 ` [Bug c++/14804] " dbaron at dbaron dot org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: dbaron at dbaron dot org @ 2004-04-01  1:32 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2004-07-19 12:09 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-01  1:32 [Bug c++/14804] New: [3.4 regression] initializing const data with reinterpret_cast-ed pointer-to-member function crashes dbaron at dbaron dot org
2004-04-01  1:33 ` [Bug c++/14804] " dbaron at dbaron dot org
2004-04-01  1:35 ` dbaron at dbaron dot org
2004-04-01  1:38 ` [Bug c++/14804] [3.3/3.4/3.5 " pinskia at gcc dot gnu dot org
2004-04-01  1:39 ` pinskia at gcc dot gnu dot org
2004-04-01  1:43 ` dbaron at dbaron dot org
2004-04-01  1:44 ` dbaron at dbaron dot org
2004-04-01  1:45 ` pinskia at gcc dot gnu dot org
2004-04-01  1:48 ` dbaron at dbaron dot org
2004-04-01  2:06 ` mmitchel at gcc dot gnu dot org
2004-04-01  2:24 ` rth at gcc dot gnu dot org
2004-04-01 20:21 ` rth at gcc dot gnu dot org
2004-04-01 20:45 ` cvs-commit at gcc dot gnu dot org
2004-04-01 20:47 ` cvs-commit at gcc dot gnu dot org
2004-04-01 21:48 ` cvs-commit at gcc dot gnu dot org
2004-04-01 21:49 ` [Bug c++/14804] " rth at gcc dot gnu dot org
2004-04-03 19:50 ` 1319 at bot dot ru
2004-04-04  6:16 ` [Bug c++/14804] [3.4/3.5 Regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
2004-04-04  6:16 ` pinskia at gcc dot gnu dot org
2004-04-04 19:31 ` mmitchel at gcc dot gnu dot org
2004-04-04 22:50 ` cvs-commit at gcc dot gnu dot org
2004-04-04 22:51 ` cvs-commit at gcc dot gnu dot org
2004-04-04 22:52 ` mmitchel at gcc dot gnu dot org
2004-04-04 22:54 ` pinskia at gcc dot gnu dot org
2004-07-19 12:09 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).