public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dbaron at dbaron dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/14804] New: [3.4 regression] initializing const data with reinterpret_cast-ed pointer-to-member function crashes
Date: Thu, 01 Apr 2004 01:32:00 -0000	[thread overview]
Message-ID: <20040401013242.14804.dbaron@dbaron.org> (raw)

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


             reply	other threads:[~2004-04-01  1:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-01  1:32 dbaron at dbaron dot org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040401013242.14804.dbaron@dbaron.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).