https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70164
--- Comment #25 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- Sorry, I can not reproduce this. With today trunk I have for pr45701-1.c (-Os -mthumb): history_expand_line_internal: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r3, r4, r5, r6, r7, lr} mov r4, r0 ldr r5, .L3 ldr r3, .L3+4 ldr r7, [r5] ldr r6, [r3] movs r3, #0 str r3, [r5] bl pre_process_line cmp r4, r0 add r6, r6, r7 str r6, [r5] bne .L1 bl str_len adds r0, r0, #1 bl x_malloc mov r1, r4 pop {r3, r4, r5, r6, r7, lr} b str_cpy .L1: pop {r3, r4, r5, r6, r7, pc}