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++/12831] New: passing reference to pointer-to-member-function crashes gcc 3.3.2


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

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

           Summary: passing reference to pointer-to-member-function crashes
                    gcc 3.3.2
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: waldeinburg at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-debian-linux-gnu
  GCC host triplet: i486-debian-linux-gnu
GCC target triplet: i486-debian-linux-gnu

The example attached compiles with gcc 2.95 (I hope this is correct behavior).

gcc 3.2 says:
 conditional expression between distinct pointer types `int 
   (**)(...)' and `void (foo::**)()' lacks a cast


gcc 3.3.2 (the newest version provided by Debian - unstable) will crash with a
segmentation fault:
 test2.cpp: I function 'int main()':
 test2.cpp:25: internal compiler error: Lagersegmentfejl

It is simply compiled with
 gcc -o test2 test2.cpp

About the example:
I made quz a template class because I discovered the problem using a container
class, but you can also make it crash by declaring it as
 void qoo ( void (foo::* & p) (void) )

Output from gcc -v:
Læser specifikationer fra /usr/lib/gcc-lib/i486-linux/3.3.2/specs
Konfigureret med: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i486-linux
Trådmodel: posix
GCC version 3.3.2 (Debian)


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