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

            Bug ID: 93597
           Summary: [10 Regression] ICE in get_fns since r10-6219
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

template <typename T>
struct S {
  using T ::operator<;
  void operator==(T x) { [x] { 0 < x; }; }
};

ICEs starting with r10-6219-g8b91e848130e45b427599ad30e99f96e447ea9aa
rh1798565.ii: In lambda function:
rh1798565.ii:5:36: internal compiler error: in get_fns, at cp/tree.c:2507
    5 |   void operator==(T x) { [x] { 0 < x; }; }
      |                                    ^
0xcc1662 get_fns(tree_node*)
        ../../gcc/cp/tree.c:2507
0xcc1680 get_first_fn(tree_node*)
        ../../gcc/cp/tree.c:2516
0xb5f71e maybe_save_operator_binding(tree_node*)
        ../../gcc/cp/name-lookup.c:7627
0xcf17ad build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node**, int)
        ../../gcc/cp/typeck.c:4235
0xb7cb5c cp_parser_binary_expression
        ../../gcc/cp/parser.c:9684
0xb7d00e cp_parser_assignment_expression
        ../../gcc/cp/parser.c:9824
0xb7d3c9 cp_parser_expression
        ../../gcc/cp/parser.c:9992
...

Reply via email to