[gcc r17-2767] gcc.target/i386/pr116274-2.c: Check function body
"H.J. Lu via Gcc-cvs" <[email protected]> Tue, 28 Jul 2026 23:09:09 +0000 (GMT)
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:30024f2093e4a234fa0e1b159d6a24514aa364cb commit r17-2767-g30024f2093e4a234fa0e1b159d6a24514aa364cb Author: H.J. Lu <[email protected]> Date: Wed Jul 29 06:51:24 2026 +0800 gcc.target/i386/pr116274-2.c: Check function body gcc.target/i386/pr116274-2.c has been optimized to: test: .cfi_startproc leaq (%rdi,%rsi), %rax ret for x86-64 since GCC 15. Add check-function-bodies to verify it. PR target/116274 * gcc.target/i386/pr116274-2.c: Add check-function-bodies. Signed-off-by: H.J. Lu <[email protected]> Diff: --- gcc/testsuite/gcc.target/i386/pr116274-2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gcc/testsuite/gcc.target/i386/pr116274-2.c b/gcc/testsuite/gcc.target/i386/pr116274-2.c index d5811344b935..87707e9b68ea 100644 --- a/gcc/testsuite/gcc.target/i386/pr116274-2.c +++ b/gcc/testsuite/gcc.target/i386/pr116274-2.c @@ -1,5 +1,17 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-slp2-optimized" } */ +/* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */ +/* { dg-final { check-function-bodies "**" "" "" { target { *-*-linux* && lp64 } } {^\t?\.} } } */ + +/* +**test: +**.LFB[0-9]+: +** .cfi_startproc +** leaq \(%rdi,%rsi\), %rax +** ret +** .cfi_endproc +**... +*/ struct a { long x,y; }; long test(struct a a) { return a.x+a.y; }