test.cc: class A { void f(); } void A::f() { A::A(); }
g++ -c test.cc /tmp/cciN3Byt.s: Assembler messages: /tmp/cciN3Byt.s:18: Warning: missing operand; zero assumed /tmp/cciN3Byt.s:18: Error: undefined symbol `_ZN1AC1Ev' in operation /tmp/cciN3Byt.s:18: Error: undefined symbol `INTERNAL' in operation I have no idea if this is valid, but these error messages are very confusing. This is GCC 4.5, 20091210 snapshot, plus the patch for PR42251. g++ -v: Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.0-alpha20091210/g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.0-alpha20091210/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.5.0_alpha20091210/work/gcc-4.5-20091210/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.0-alpha20091210 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0-alpha20091210/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.0-alpha20091210 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.0-alpha20091210/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.0-alpha20091210/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0-alpha20091210/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.0-alpha20091210/python --enable-java-awt=gtk --enable-languages=c,c++,java --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.0_alpha20091210' --enable-checking Thread model: posix gcc version 4.5.0-alpha20091210 20091210 (experimental) (Gentoo 4.5.0_alpha20091210) -- Summary: Bad assembly generated for constructor call Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: truedfx at gentoo dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42415