This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/88120] New: ICE in contains_placeholder_p at gcc/tree.c:3710


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

            Bug ID: 88120
           Summary: ICE in contains_placeholder_p at gcc/tree.c:3710
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: aarch64-linux-gnu

Happens on GCC 6, 7, 8 and trunk branch:

$ cat Unified.ii
typedef int a;
enum b : a;
class c {
  enum f { d };
  c(f);
  friend c operator&(c, c);
  typedef void (c::*e)();
  operator e();
};
class g {
  template <typename, typename> b h();
  struct k {
    c i;
  };
};
template <typename, typename> b g::h() {
  k j;
  &j || j.i &c::d;
  return b();
}

$ aarch64-linux-g++ Unified.ii -c 
Unified.ii: In member function ‘b g::h()’:
Unified.ii:18:17: internal compiler error: tree check: did not expect class
‘type’, have ‘type’ (record_type) in contains_placeholder_p, at tree.c:3710
   18 |   &j || j.i &c::d;
      |                 ^
0x7d1ef7 tree_not_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        /home/marxin/Programming/gcc/gcc/tree.c:9767
0x7d6580 non_type_check(tree_node*, char const*, int, char const*)
        /home/marxin/Programming/gcc/gcc/tree.h:3333
0x7d6580 contains_placeholder_p(tree_node const*)
        /home/marxin/Programming/gcc/gcc/tree.c:3710
0x125550a contains_placeholder_p(tree_node const*)
        /home/marxin/Programming/gcc/gcc/tree.c:3761
0x125537d contains_placeholder_p(tree_node const*)
        /home/marxin/Programming/gcc/gcc/tree.c:3748
0x125537d contains_placeholder_p(tree_node const*)
        /home/marxin/Programming/gcc/gcc/tree.c:3748
0x125550a contains_placeholder_p(tree_node const*)
        /home/marxin/Programming/gcc/gcc/tree.c:3761
0x1255b47 save_expr(tree_node*)
        /home/marxin/Programming/gcc/gcc/tree.c:3573
0xa7216e cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*,
int)
        /home/marxin/Programming/gcc/gcc/cp/typeck.c:4922
0x8e70b1 ocp_convert(tree_node*, tree_node*, int, int, int)
        /home/marxin/Programming/gcc/gcc/cp/cvt.c:838
0x8e8748 cp_convert_and_check(tree_node*, tree_node*, int)
        /home/marxin/Programming/gcc/gcc/cp/cvt.c:651
0x890c56 convert_like_real
        /home/marxin/Programming/gcc/gcc/cp/call.c:7280
0x89dba3 build_new_op_1
        /home/marxin/Programming/gcc/gcc/cp/call.c:6028
0x89e29d build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*,
tree_node*, tree_node**, int)
        /home/marxin/Programming/gcc/gcc/cp/call.c:6136
0xa6209b build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code,
tree_node*, tree_code, tree_node**, int)
        /home/marxin/Programming/gcc/gcc/cp/typeck.c:4130
0x993041 cp_parser_binary_expression
        /home/marxin/Programming/gcc/gcc/cp/parser.c:9407
0x993e59 cp_parser_assignment_expression
        /home/marxin/Programming/gcc/gcc/cp/parser.c:9542
0x9941c3 cp_parser_expression
        /home/marxin/Programming/gcc/gcc/cp/parser.c:9709
0x997874 cp_parser_expression_statement
        /home/marxin/Programming/gcc/gcc/cp/parser.c:11244
0x9a2bf1 cp_parser_statement
        /home/marxin/Programming/gcc/gcc/cp/parser.c:11040

The same happens with native compiler, the issues is reduced from
MozillaFirefox package.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]