This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12616] New: C++ regression with member pointer code


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: C++ regression with member pointer code
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ahaas at airmail dot net
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i586-pc-linux-gnu

Here's the code:

struct C { int i; };

typedef int C::*mPtr;
const mPtr m = &C::i;

int main(int argc, char ** argv) { return 0; }

With GCC-3.3 from Debian (3.3.2 20030908 (Debian prerelease)) this code compiles
and executes without error. With GCC-3.4 from CVS the code compiles but fails to
execute. Instead a segmentation violation occurs.

GCC-3.4 info:

$ g++ -v
Reading specs from /opt/gnu/lib/gcc/i586-pc-linux-gnu/3.4/specs
Configured with: /usr/src/gcc_3_4_branch/gcc/configure --prefix=/opt/gnu
--enable-shared --enable-__cxa_atexit --enable-languages=c,c++,f77,objc
--disable-checking --with-gc=zone
Thread model: posix
gcc version 3.4 20031012 (experimental)

The code was posted in a message to gcc-patches regarding a patch that the
author (not me) said would fix a Mozilla compile issue.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]