https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109299
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, it looks better: --- 109299-orig.s 2023-03-28 11:01:09.886119878 +0100 +++ 109299-fixed.s 2023-03-28 11:01:21.361187289 +0100 @@ -235,21 +235,14 @@ xorl %esi, %esi call wmemset movq (%rsp), %rax - leaq 48(%rsp), %rdi - movq $42, 8(%rsp) - movq %rdi, 32(%rsp) + leaq 32(%rsp), %rdi + movq %rbx, (%rsp) + movq $42, 40(%rsp) movl $0, 168(%rax) - cmpq %rbx, %rax - je .L35 movq %rax, 32(%rsp) movq 16(%rsp), %rax - movq %rax, 48(%rsp) - movl $42, %eax -.L36: - leaq 32(%rsp), %rdi - movq %rax, 40(%rsp) - movq %rbx, (%rsp) movq $0, 8(%rsp) + movq %rax, 48(%rsp) movl $0, 16(%rsp) call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE10_M_disposeEv movq %rsp, %rdi @@ -261,17 +254,10 @@ popq %rbx .cfi_def_cfa_offset 8 ret -.L35: +.L36: .cfi_restore_state - movl $4, %ecx - movl $43, %edx - movq %rbx, %rsi - call __wmemcpy_chk - movq 8(%rsp), %rax - jmp .L36 -.L38: movq %rax, %rbx - jmp .L37 + jmp .L35 .globl __gxx_personality_v0 .section .gcc_except_table,"a",@progbits .LLSDA1811: @@ -282,7 +268,7 @@ .LLSDACSB1811: .uleb128 .LEHB0-.LFB1811 .uleb128 .LEHE0-.LEHB0 - .uleb128 .L38-.LFB1811 + .uleb128 .L36-.LFB1811 .uleb128 0 .LLSDACSE1811: .section .text.startup @@ -294,7 +280,7 @@ .type main.cold, @function main.cold: .LFSB1811: -.L37: +.L35: .cfi_def_cfa_offset 80 .cfi_offset 3, -16 movq %rsp, %rdi