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

            Bug ID: 121085
           Summary: internal compiler error: Segmentation fault since 12.1
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mario.rodriguezb1 at um dot es
  Target Milestone: ---

ICE in:

Program:

```
#include <iostream>
int main()
{
  std::reference_wrapper<void> e{};
}
```

Stack dump

```
/opt/compiler-explorer/gcc-trunk-20250715/include/c++/16.0.0/bits/refwrap.h:335:53:
internal compiler error: Segmentation fault
  335 |                 =
decltype(reference_wrapper::_S_fun(std::declval<_Up>()))>
      |                           
~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
0x2879ca5 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
        ???:0
0x289b986 internal_error(char const*, ...)
        ???:0
0xd556bd tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0xd55c14 tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0xd841bc instantiate_class_template(tree_node*)
        ???:0
0xbc2b22 start_decl_1(tree_node*, bool)
        ???:0
0xbe3781 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ???:0
0xd20193 c_parse_file()
        ???:0
0xe8a449 c_common_parse_file()
        ???:0
```

To quickly reproduce:

https://godbolt.org/z/5hfeoT7f6
  • [Bug c++/121085] New: internal... mario.rodriguezb1 at um dot es via Gcc-bugs

Reply via email to