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

             Bug #: 51565
           Summary: fastcall in array of method pointers: internal
                    compiler error
    Classification: Unclassified
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: a...@kent.ac.uk


Created attachment 26099
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26099
Preprocessed source (15 lines)

The attached program (presumably illegal) attempts to insert a pointer to a
class member function into an array of such pointers.  However, the inserted
function has the fastcall attribute: this causes an internal compiler error:

> gcc -v --save-temps -c -Wall bug.cpp
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.5/lto-wrapper
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.5
--enable-linux-futex --without-system-libunwind --enable-gold
--with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic
--build=i586-suse-linux
Thread model: posix
gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-Wall' '-mtune=generic'
'-march=i586'
 /usr/lib/gcc/i586-suse-linux/4.5/cc1plus -E -quiet -v -D_GNU_SOURCE bug.cpp
-mtune=generic -march=i586 -Wall -fpch-preprocess -o bug.ii
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.5
 /usr/include/c++/4.5/i586-suse-linux
 /usr/include/c++/4.5/backward
 /usr/local/include
 /usr/lib/gcc/i586-suse-linux/4.5/include
 /usr/lib/gcc/i586-suse-linux/4.5/include-fixed
 /usr/lib/gcc/i586-suse-linux/4.5/../../../../i586-suse-linux/include
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-Wall' '-mtune=generic'
'-march=i586'
 /usr/lib/gcc/i586-suse-linux/4.5/cc1plus -fpreprocessed bug.ii -quiet
-dumpbase bug.cpp -mtune=generic -march=i586 -auxbase bug -Wall -version -o
bug.s
GNU C++ (SUSE Linux) version 4.5.1 20101208 [gcc-4_5-branch revision 167585]
(i586-suse-linux)
        compiled by GNU C version 4.5.1 20101208 [gcc-4_5-branch revision
167585], GMP version 5.0.1, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=125809
GNU C++ (SUSE Linux) version 4.5.1 20101208 [gcc-4_5-branch revision 167585]
(i586-suse-linux)
        compiled by GNU C version 4.5.1 20101208 [gcc-4_5-branch revision
167585], GMP version 5.0.1, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=125809
Compiler executable checksum: 3bd6bad154f92415c6ab6c213479edc0
bug.cpp: In function ‘int main()’:
bug.cpp:9:25: internal compiler error: in process_init_constructor_array, at
cp/typeck2.c:1039
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.

Reply via email to