[Bug c++/84970] New: internal compiler error: in tsubst_copy, at cp/pt.c:15085

vegard.nossum at oracle dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 19 20:03:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84970

            Bug ID: 84970
           Summary: internal compiler error: in tsubst_copy, at
                    cp/pt.c:15085
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vegard.nossum at oracle dot com
                CC: nathan at gcc dot gnu.org, webrown.cpp at gmail dot com
  Target Milestone: ---

Input:

namespace {
void a();
}
template <typename b> void a(b) { int c(a); }
void d { a(1e31) }

Output:

$ cc1plus 
 void a(b)
<stdin>: At global scope:
<stdin>:5:6: error: variable or field 'd' declared void
 void a(b) [with b = double]
<stdin>: In instantiation of 'void a(b) [with b = double]':
<stdin>:5:16:   required from here
<stdin>:4:39: internal compiler error: in tsubst_copy, at cp/pt.c:15085
0x10e5c47 tsubst_copy
        /home/vegard/git/gcc/gcc/cp/pt.c:15085
0x10f43f3 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/vegard/git/gcc/gcc/cp/pt.c:17573
0x10f31ce tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/vegard/git/gcc/gcc/cp/pt.c:18184
0x10bd816 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/vegard/git/gcc/gcc/cp/pt.c:16987
0x5ea152 tsubst_init
        /home/vegard/git/gcc/gcc/cp/pt.c:14876
0x10c830e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/vegard/git/gcc/gcc/cp/pt.c:16317
0x10bc178 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/vegard/git/gcc/gcc/cp/pt.c:16471
0x10b2b3f instantiate_decl(tree_node*, bool, bool)
        /home/vegard/git/gcc/gcc/cp/pt.c:23542
0x11e75d7 instantiate_pending_templates(int)
        /home/vegard/git/gcc/gcc/cp/pt.c:23658
0xc68614 c_parse_final_cleanups()
        /home/vegard/git/gcc/gcc/cp/decl2.c:4721
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Version:

GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu)

Error message looks like a dup of bug #84702 but this test case also reproduces
on trunk on godbolt.org (20180318).


More information about the Gcc-bugs mailing list