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

            Bug ID: 123694
           Summary: Internal Compiler error in guard_tinfo_to_string, at
                    c-family/c-indentation.cc:610
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: srytting at pm dot me
  Target Milestone: ---

Created attachment 63389
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63389&action=edit
Preprocessed source causing the error

## Command line:
`g++ main.cpp -std=c++26 -freflection -Wall -Wextra`

## GCC output:
```
main.cpp: In function ‘int main()’:
main.cpp:108:31: error: expected ‘:’ before ‘;’ token
  108 |     template for (size_t i = 0; i < members.size(); ++i){
      |                               ^
      |                               :
main.cpp:108:31: error: expected primary-expression before ‘;’ token
main.cpp:108:31: error: expected ‘)’ before ‘;’ token
  108 |     template for (size_t i = 0; i < members.size(); ++i){
      |                  ~            ^
      |                               )
main.cpp:108:31: internal compiler error: in guard_tinfo_to_string, at
c-family/c-indentation.cc:610
0x273120f internal_error(char const*, ...)
        ../../gcc/gcc/diagnostic-global-context.cc:787
0x788129 fancy_abort(char const*, int, char const*)
        ../../gcc/gcc/diagnostics/context.cc:1805
0x511b1d guard_tinfo_to_string(rid)
        ../../gcc/gcc/c-family/c-indentation.cc:610
0x511b50 guard_tinfo_to_string(rid)
        ../../gcc/gcc/diagnostics/context.h:444
0x511b50 warn_for_misleading_indentation(token_indent_info const&,
token_indent_info const&, token_indent_info const&)
        ../../gcc/gcc/c-family/c-indentation.cc:656
0x9dd9a8 cp_parser_already_scoped_statement
        ../../gcc/gcc/cp/parser.cc:16951
0x9dddc6 cp_parser_expansion_statement
        ../../gcc/gcc/cp/parser.cc:16616
0x99dcae cp_parser_statement
        ../../gcc/gcc/cp/parser.cc:14251
0x9a0d30 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.cc:14996
0x9a101f cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.cc:14843
0x9d0835 cp_parser_function_body
        ../../gcc/gcc/cp/parser.cc:28714
0x9d0835 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.cc:28765
0x9a137f cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.cc:35962
0x9d71aa cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.cc:35877
0x9d71aa cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.cc:25921
0x9d9728 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.cc:17991
0x9e7263 cp_parser_declaration
        ../../gcc/gcc/cp/parser.cc:17531
0x9e877a cp_parser_toplevel_declaration
        ../../gcc/gcc/cp/parser.cc:17635
0x9e877a cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.cc:5567
0x9e877a c_parse_file()
        ../../gcc/gcc/cp/parser.cc:57340
```

Reply via email to