http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47971
Summary: [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11725 on valid code Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Created attachment 23530 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23530 reduced testcase $ gcc testcase.C testcase.C: In constructor 'S< <template-parameter-1-1> >::S() [with <template-parameter-1-1> = double]': testcase.C:7:11: instantiated from here testcase.C:4:10: internal compiler error: in tsubst_copy, at cp/pt.c:11725 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. (gdb) bt #0 fancy_abort (file=0x120a958 "/mnt/svn/gcc-trunk/gcc/cp/pt.c", line=11725, function=0x120fcbd "tsubst_copy") at /mnt/svn/gcc-trunk/gcc/diagnostic.c:892 #1 0x000000000055cb25 in tsubst_copy (t=<value optimized out>, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450) at /mnt/svn/gcc-trunk/gcc/cp/pt.c:11725 #2 0x000000000055ff61 in tsubst_copy_and_build (t=0x7ffff5bdc690, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450, function_p=0 '\000', integral_constant_expression_p=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/cp/pt.c:13382 #3 0x000000000055fbab in tsubst_copy_and_build (t=0x7ffff5bc8840, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450, function_p=<value optimized out>, integral_constant_expression_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/pt.c:12980 #4 0x00000000005608a2 in tsubst_copy_and_build (t=0x7ffff5bc8880, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450, function_p=0 '\000', integral_constant_expression_p=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/cp/pt.c:12862 #5 0x0000000000554e39 in tsubst_expr (t=0x7ffff5bc8880, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450, integral_constant_expression_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/pt.c:12422 #6 0x0000000000555bc9 in tsubst_expr (t=0x7ffff7ecea80, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450, integral_constant_expression_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/pt.c:11998 #7 0x0000000000554ee9 in tsubst_expr (t=0x7ffff5bc8800, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450, integral_constant_expression_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/pt.c:12163 #8 0x0000000000555505 in tsubst_expr (t=<value optimized out>, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450, integral_constant_expression_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/pt.c:11984 #9 0x0000000000554ee9 in tsubst_expr (t=0x7ffff5bc87c0, args=0x7ffff5bee050, complain=3, in_decl=0x7ffff5bec450, integral_constant_expression_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/pt.c:12163 #10 0x0000000000581fe2 in instantiate_decl (d=0x7ffff5bdf500, defer_ok=<value optimized out>, expl_inst_class_mem_p=0 '\000') at /mnt/svn/gcc-trunk/gcc/cp/pt.c:17421 #11 0x0000000000589444 in instantiate_pending_templates (retries=<value optimized out>) at /mnt/svn/gcc-trunk/gcc/cp/pt.c:17518 #12 0x00000000005b7942 in cp_write_global_declarations () at /mnt/svn/gcc-trunk/gcc/cp/decl2.c:3684 #13 0x0000000000a2c998 in compile_file (argc=13, argv=0x7fffffffdbc8) at /mnt/svn/gcc-trunk/gcc/toplev.c:591 Tested revisions: r170622 - crash 4.5 r170013 - OK 4.4 r170013 - OK