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

            Bug ID: 108607
           Summary: [12/13 Regression] ICE in
                    potential_constant_expression_1, at
                    cp/constexpr.cc:10003
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started between 20210808 and 20210822 :


$ cat z1.cc
constexpr int bar (int x);
constexpr int foo (int x)
{
  [[omp::directive (scope nowait)]]
  return bar (x);
}


$ g++-13-20230129 -c z1.cc -fopenmp
z1.cc: In function 'constexpr int foo(int)':
z1.cc:5:16: error: invalid exit from OpenMP structured block
    5 |   return bar (x);
      |                ^
z1.cc:6:1: sorry, unimplemented: unexpected AST of kind omp_scope
    6 | }
      | ^
z1.cc:6:1: internal compiler error: in potential_constant_expression_1, at
cp/constexpr.cc:10003
0x893ef0 potential_constant_expression_1
        ../../gcc/cp/constexpr.cc:10003
0x89536a potential_constant_expression_1(tree_node*, bool, bool, bool, bool,
int)
        ../../gcc/cp/constexpr.cc:10027
0x896166 potential_rvalue_constant_expression(tree_node*)
        ../../gcc/cp/constexpr.cc:10047
0x896166 maybe_save_constexpr_fundef(tree_node*)
        ../../gcc/cp/constexpr.cc:959
0x926a31 finish_function(bool)
        ../../gcc/cp/decl.cc:18204
0xa64e03 cp_parser_function_definition_after_declarator
        ../../gcc/cp/parser.cc:31998
0xa6633c cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/cp/parser.cc:31912
0xa6633c cp_parser_init_declarator
        ../../gcc/cp/parser.cc:22777
0xa36572 cp_parser_simple_declaration
        ../../gcc/cp/parser.cc:15390
0xa6dd1b cp_parser_declaration
        ../../gcc/cp/parser.cc:15076
0xa6e838 cp_parser_translation_unit
        ../../gcc/cp/parser.cc:5131
0xa6e838 c_parse_file()
        ../../gcc/cp/parser.cc:49472
0xc169e1 c_common_parse_file()
        ../../gcc/c-family/c-opts.cc:1248

Reply via email to