[Bug c/87110] New: tree check fail in to_wide, at tree.h:5523

dcb314 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Sun Aug 26 17:55:00 GMT 2018


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

            Bug ID: 87110
           Summary: tree check fail in to_wide, at tree.h:5523
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Somewhere between revisions 263799 and 263849, this C code

enum a { b, c };
struct d {
  _Bool e;
  enum a f
};
g, h;
i() {
  struct d j[h];
  j[0] = (struct d){.f = c};
  for (; g;)
    (struct d){};
}

goes wrong:

/home/dcb/gcc/results.263799.asan/bin/gcc
/home/dcb/gcc/results.263849/bin/gcc
during GIMPLE pass: dse
bug460.c: In function ‘i’:
bug460.c:12:1: internal compiler error: tree check: expected integer_cst, have
v
ar_decl in to_wide, at tree.h:5523
12 | }
   | ^
0x6b17b1 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../trunk/gcc/tree.c:9370
0x6b3f9d tree_check(tree_node const*, char const*, int, char const*, tree_code)
        ../../trunk/gcc/tree.h:3376
0x6b3f9d wi::to_wide(tree_node const*)
        ../../trunk/gcc/tree.h:5523
0x6b3f9d tree_int_cst_sgn(tree_node const*)
        ../../trunk/gcc/tree.c:6872

with compiler flag -O2.


More information about the Gcc-bugs mailing list