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

For this C source code:

a, b;
c() {
  char d[b];
  char *e = &d[0];
  strncpy(a, e, 3);

with flag -O2, recent gcc trunk does this:

bug417.c:2:1: internal compiler error: tree check: expected integer_cst, have
us_expr in to_wide, at tree.h:5527
 c() {
0x59606c tree_check_failed(tree_node const*, char const*, int, char const*,
0x6f9a88 tree_check(tree_node const*, char const*, int, char const*, tree_code)
0x6f9a88 wi::to_wide(tree_node const*)
0x6f9a88 wi::to_wide(tree_node const*, unsigned int)

I'll have a go at finding a range of revisions for the bug.

Reply via email to