[Bug bootstrap/87672] [9 regression] 81512c36 causes ICE in bootstrap stage 3 using "-D_FORTIFY_SOURCE=2" (invalid operand in unary operation, incorrect sharing of tree nodes, verify_gimple failed)
bernd.edlinger at hotmail dot de
gcc-bugzilla@gcc.gnu.org
Sun Oct 21 11:18:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87672
--- Comment #7 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Until dom3, everything is OK...
i386.ii.176t.dom3:
<bb 15> [local count: 267871744]:
__builtin___strcat_chk (&buf, _14, 40);
output_asm_insn (&buf, operands_23(D));
goto <bb 14>; [100.00%]
... but strlen does an invalid transformation,
which is does not even cause the ICE,
the last parameter should be 36, because
the strcpy_chk needs the size of the remaining
buffer after the first 4 bytes...
i386.ii.177t.strlen:
<bb 15> [local count: 267871744]:
_27 = &buf + 4;
__builtin___strcpy_chk (_27, _14, 40);
output_asm_insn (&buf, operands_23(D));
goto <bb 14>; [100.00%]
i386.ii.178t.thread4:
<bb 15> [local count: 267871744]:
_27 = &buf + 4;
__builtin___strcpy_chk (_27, _14, 40);
output_asm_insn (&buf, operands_23(D));
goto <bb 14>; [100.00%]
... and now in vrp2, the strcpy_chk is replaced
by something that looks not gimplified, which
causes the ICE:
i386.ii.179t.vrp2:
<bb 15> [local count: 267871744]:
_58 = (long unsigned int) ((ssizetype) _17 <= 7 ? 7 - (ssizetype) _17 : 0);
_59 = _58 + 1;
__builtin___memcpy_chk (&MEM[(void *)&buf + 4B], _14, _59, 40);
output_asm_insn (&buf, operands_23(D));
goto <bb 14>; [100.00%]
More information about the Gcc-bugs
mailing list