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

            Bug ID: 97732
           Summary: ice: tree check fail
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

typedef int a;
typedef struct {
  a b, blink;
} c;
int d;
c *e;
void f(void) {
  e = f;
  for (; d; d += 1, e += 1)
    e->b = e->blink = e;
}

compiled with recent gcc trunk and compiler flag -O3, does this:

during RTL pass: expand
bug667.c: In function ‘f’:
bug667.c:7:6: internal compiler error: tree check: expected integer_cst, have
addr_expr in get_val, at tree.h:6008
    7 | void f(void) {
      |      ^
0xfd77ba tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../trunk.git/gcc/tree.c:9752
0x7b0221 tree_int_cst_elt_check(tree_node const*, int, char const*, int, char
const*)
        ../../trunk.git/gcc/tree.h:3501

The bug first appeared sometime between 20201031 and 20201103.

Reply via email to