http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47991
Summary: [4.6 Regression] Var-tracking ICE on s390x *setmem_long insn Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: debug AssignedTo: ja...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org Target: s390x-linux /* { dg-do compile } */ /* { dg-options "-g -Os" } */ typedef __SIZE_TYPE__ size_t; extern inline __attribute__ ((__always_inline__)) void * memset (void *x, int y, size_t z) { return __builtin___memset_chk (x, y, z, __builtin_object_size (x, 0)); } void foo (unsigned char *x, unsigned char *y, unsigned char *z, unsigned char *w, unsigned int v, int u, int t) { int i; for (i = 0; i < t; i++) { memset (z, x[0], v); memset (w, y[0], v); x += u; } __builtin_memcpy (z, x, u); } ICEs on s390x-linux in var-tracking, because (insn 56 71 57 5 (parallel [ (clobber (reg:TI 6 %r6)) (set (mem:BLK (subreg:DI (reg:TI 6 %r6) 0) [0 A8]) (reg:DI 10 %r10 [95])) (use (reg:TI 6 %r6)) (use (reg:TI 2 %r2)) (clobber (reg:CC 33 %cc)) ]) pr47372.i:9 115 {*setmem_long} (expr_list:REG_DEAD (reg:DI 10 %r10 [95]) (expr_list:REG_DEAD (reg:DI 7 %r7) (expr_list:REG_UNUSED (reg:CC 33 %cc) (expr_list:REG_UNUSED (reg:TI 6 %r6) (nil)))))) is really weird. But we already allow (set (mem:BLK ...) (const_int ...)) for memset, and while this one is much worse than that, let's workaround it in var-tracking too. Not sure if this is a problem in 4.5 too, certainly not in 4.4 which didn't have VTA.