https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61773
Bug ID: 61773 Summary: [4.10 Regression] ICE in tree-ssa-strlen.c:417 Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org char *foo (void) { char *p = __builtin_malloc (64); char *q = __builtin_malloc (64); __builtin_strcat (q, "abcde"); __builtin_strcat (p, "ab"); p[1] = q[3]; __builtin_strcat (p, q); return q; } gives > ../../obj2/gcc/cc1 -quiet -O2 t.c t.c: In function ‘foo’: t.c:1:7: internal compiler error: in get_string_length, at tree-ssa-strlen.c:417 char *foo (void) ^ 0x876c3d2 get_string_length /space/rguenther/tramp3d/trunk/gcc/tree-ssa-strlen.c:417 0x8772b02 get_string_length /space/rguenther/tramp3d/trunk/gcc/tree.h:2731 0x8772b02 handle_builtin_strlen /space/rguenther/tramp3d/trunk/gcc/tree-ssa-strlen.c:899 (gdb) up #1 0x0876c3d3 in get_string_length (si=0x3c) at /space/rguenther/tramp3d/trunk/gcc/tree-ssa-strlen.c:417 417 gcc_assert (builtin_decl_implicit_p (BUILT_IN_STPCPY)); while trying to write a testcase that shows that handle_char_store should handle a character copy from a known non-zero value. Well, while really trying to incrementally teach handle_char_store to handle arbitrary stores.