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

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

This code

typedef a;
static *b[] = {"'", ""};
c(d) {
  for (a e = 0; b[0]; e++)
    if (strstr(d, b[e]))
      return 1;
}

does this

$ ~/gcc/results/bin/gcc -c -w -O2 bug361.c
during GIMPLE pass: forwprop
bug361.c: In function ā€˜c’:
bug361.c:3:1: internal compiler error: tree check: expected ssa_name, have
var_decl in simplify_builtin_call, at tree-ssa-forwprop.c:1244
 c(d) {
 ^
0x5793ee tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../trunk/gcc/tree.c:9861
0xda5f8d tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../trunk/gcc/tree.h:3083
0xda5f8d simplify_builtin_call
        ../../trunk/gcc/tree-ssa-forwprop.c:1244
0xda76bc execute
        ../../trunk/gcc/tree-ssa-forwprop.c:2473
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

This seems to be going wrong since some time before gcc revision 236947.

Reply via email to