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

            Bug ID: 121086
           Summary: Raw Segmentation fault with virtual static unsigned
                    since version 3.4.6
           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

```
template <typename T>
inline int f(T a, T & b) {
        union U {
                virtual static unsigned int: 22;
        };
}
```

Stack dump 

```
In function 'int f(T, T&)':
Segmentation fault
    4 |                 virtual static unsigned int: 22;
      |                                              ^~
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
0x28dcfa3 pretty_printer::format(text_info&)
        ???:0
0x28797e6 diagnostic_context::report_diagnostic(diagnostic_info*)
        ???:0
0x2879ca5 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
        ???:0
0x289b380 error_at(rich_location*, char const*, ...)
        ???:0
0xbd7ed2 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        ???:0
0xbfd70f grokbitfield(cp_declarator const*, cp_decl_specifier_seq*, 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/sbhhshd16

Reply via email to