[Bug tree-optimization/67283] GCC regression over inlining of returned structures
roche at httrack dot com
gcc-bugzilla@gcc.gnu.org
Thu Aug 27 16:55:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67283
--- Comment #10 from Xavier Roche <roche at httrack dot com> ---
The "Second test case" attached should produce exactly the same bytes
(byte-to-byte) for the two demo_1 and demo_2 functions. And this would not rely
on stack size that might change.
With GCC 4.4.7:
demo_2():
subq $72, %rsp
movl $0, 32(%rsp)
movq 32(%rsp), %rax
movq $0, 48(%rsp)
movq $0, 40(%rsp)
movq $0, 8(%rsp)
movq $0, 16(%rsp)
movq %rax, (%rsp)
call some_unknown_function(foo)
addq $72, %rsp
ret
demo_1():
subq $72, %rsp
movl $0, 32(%rsp)
movq 32(%rsp), %rax
movq $0, 48(%rsp)
movq $0, 40(%rsp)
movq $0, 8(%rsp)
movq $0, 16(%rsp)
movq %rax, (%rsp)
call some_unknown_function(foo)
addq $72, %rsp
ret
More information about the Gcc-bugs
mailing list