http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58983
Bug ID: 58983 Summary: ICE when inheriting templated constructor Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wtt6 at cornell dot edu $ cat foo.cpp struct Base { template<class T> Base(T) { } }; struct Derived: public Base { using Base::Base; }; int main() { Derived(1); return 0; } $ /var/tmp/portage/wthrowe-gcc-trunk/dist/bin/g++ -v -std=c++11 foo.cpp Using built-in specs. COLLECT_GCC=/var/tmp/portage/wthrowe-gcc-trunk/dist/bin/g++ COLLECT_LTO_WRAPPER=/var/tmp/portage/wthrowe-gcc-trunk/dist/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../srcdir/configure --prefix=/var/tmp/portage/wthrowe-gcc-trunk/dist Thread model: posix gcc version 4.9.0 20131103 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /var/tmp/portage/wthrowe-gcc-trunk/dist/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1plus -quiet -v -D_GNU_SOURCE foo.cpp -quiet -dumpbase foo.cpp -mtune=generic -march=x86-64 -auxbase foo -std=c++11 -version -o /tmp/ccBubai5.s GNU C++ (GCC) version 4.9.0 20131103 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.9.0 20131103 (experimental), GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/var/tmp/portage/wthrowe-gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /var/tmp/portage/wthrowe-gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../include/c++/4.9.0 /var/tmp/portage/wthrowe-gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../include/c++/4.9.0/x86_64-unknown-linux-gnu /var/tmp/portage/wthrowe-gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../include/c++/4.9.0/backward /var/tmp/portage/wthrowe-gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include /var/tmp/portage/wthrowe-gcc-trunk/dist/include /var/tmp/portage/wthrowe-gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/include-fixed /usr/include End of search list. GNU C++ (GCC) version 4.9.0 20131103 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.9.0 20131103 (experimental), GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.1 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 2df0428df4df4a6a1a5fa39a6a3e09ed foo.cpp: In constructor ‘Derived::Derived(T) [with T = int]’: foo.cpp:2:43: internal compiler error: Bus error struct Derived: public Base { using Base::Base; }; ^ 0xb2d06f crash_signal ../../srcdir/gcc/toplev.c:334 0xf3dfa0 recog_97 ../../srcdir/gcc/config/i386/i386.md:941 0xdf594d recog_memoized ../../srcdir/gcc/recog.h:155 0xdf594d insn_default_length(rtx_def*) ../../srcdir/gcc/config/i386/i386.md:636 0x8e59bd shorten_branches(rtx_def*) ../../srcdir/gcc/final.c:1190 0x8e5c8f rest_of_handle_shorten_branches ../../srcdir/gcc/final.c:4516 0x8e5c8f execute ../../srcdir/gcc/final.c:4545 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.