[Bug c++/84344] New: [concepts] ICE with invalid use of auto

reichelt at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 12 18:24:00 GMT 2018


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

            Bug ID: 84344
           Summary: [concepts] ICE with invalid use of auto
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
            Blocks: 67491
  Target Milestone: ---

The following invalid code snippet triggers ICE since GCC 6.1.0
if compiled with "-fconcepts":

=====================================
template<typename> void foo() {}

template void foo<auto>();
=====================================

bug.cc: In instantiation of 'void foo() [with <template-parameter-1-1> =
auto]':
bug.cc:3:25:   required from here
bug.cc:1:32: internal compiler error: Segmentation fault
 template<typename> void foo() {}
                                ^
0xeb087f crash_signal
        ../../gcc/gcc/toplev.c:325
0x117dff4 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/gcc/tree.h:3131
0x117dff4 ultimate_transparent_alias_target
        ../../gcc/gcc/varasm.c:1285
0x117f21e notice_global_symbol(tree_node*)
        ../../gcc/gcc/varasm.c:1670
0xae482a cgraph_node::finalize_function(tree_node*, bool)
        ../../gcc/gcc/cgraphunit.c:452
0x9a556f expand_or_defer_fn(tree_node*)
        ../../gcc/gcc/cp/semantics.c:4242
0x96522d instantiate_decl(tree_node*, bool, bool)
        ../../gcc/gcc/cp/pt.c:23419
0x98f79b instantiate_pending_templates(int)
        ../../gcc/gcc/cp/pt.c:23514
0x8b19fb c_parse_final_cleanups()
        ../../gcc/gcc/cp/decl2.c:4715
Please submit a full bug report, [etc.]


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues


More information about the Gcc-bugs mailing list