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

            Bug ID: 67144
           Summary: [6 Regression] [C++1z] ICE; in get_constraints, at
                    cp/pt.c:23346
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

trippels@gcc2-power8 ipdl % cat BluetoothTypes.ii
typedef unsigned uint32_t;
class A {
public:
  void operator==(A);
  operator uint32_t() const;
  operator int() const;
};
class BluetoothNamedValue {
  bool operator==(const BluetoothNamedValue &) const;
  A value() const;
};
auto BluetoothNamedValue::
operator==(const BluetoothNamedValue &) const -> bool {
  value() == value();
  return true;
}

trippels@gcc2-power8 ipdl % g++ -Wall -Wextra -c BluetoothTypes.ii
trippels@gcc2-power8 ipdl % g++ -c -std=c++1z BluetoothTypes.ii
BluetoothTypes.ii: In member function ‘bool
BluetoothNamedValue::operator==(const BluetoothNamedValue&) const’:
BluetoothTypes.ii:14:20: internal compiler error: in get_constraints, at
cp/pt.c:23346
   value() == value();
                    ^
0x101f3a2f get_constraints(tree_node*)
        ../../gcc/gcc/cp/pt.c:23346
0x104498b3 more_constrained(tree_node*, tree_node*)
        ../../gcc/gcc/cp/constraint.cc:2251
0x10185603 joust
        ../../gcc/gcc/cp/call.c:9164
0x10186713 joust
        ../../gcc/gcc/cp/call.c:9388
0x10186713 tourney
        ../../gcc/gcc/cp/call.c:9352
0x1019577b build_new_op_1
        ../../gcc/gcc/cp/call.c:5589
0x1019600f build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
        ../../gcc/gcc/cp/call.c:5776
0x1031ffa3 build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code,
tree_node*, tree_code, tree_node**, int)
        ../../gcc/gcc/cp/typeck.c:3820
0x102ec417 cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:8362
0x102ecccb cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:8481
0x102f7e03 cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8635
0x102fa55b cp_parser_expression_statement
        ../../gcc/gcc/cp/parser.c:10049
0x102dfe77 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9900
0x102e0ee3 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:10172
0x102e10ff cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:10126
0x10308963 cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:19783
0x10308963 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:19819
0x1030992b cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:24426
0x1030aa4f cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:24338
0x1030aa4f cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:17619
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to