https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83896
Bug ID: 83896 Summary: ice in tree_to_shwi, at tree.c:6847 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 from revision 256420 to 256556, the following C code, with flag -O2, does this: during GIMPLE pass: strlen bug412-min.c: In function āeā: bug412-min.c:4:1: internal compiler error: in tree_to_shwi, at tree.c:6847 e() { ^ 0x10f170f tree_to_shwi(tree_node const*) ../../trunk/gcc/tree.c:6847 0x58aafd get_string_len ../../trunk/gcc/tree-ssa-strlen.c:2793 0x58aafd handle_char_store ../../trunk/gcc/tree-ssa-strlen.c:2970 C source code is typedef struct { char a[5] } b; c; b d; e() { if (strlen(&c) != 4) memcpy(d.a, &c, sizeof(d)); }