https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128980
Bug ID: 128980
Summary: aarch64 SVE2 scan/body tests become UNRESOLVED with
binutils supporting SVE2.1/SVE2.2
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: yansendao at 126 dot com
Target Milestone: ---
The following tests in gcc.target/aarch64/sve2/acle/general/
become UNRESOLVED when the assembler supports the SVE2.1/SVE2.2
instructions (for example binutils 2.47.50):
firstp.c, lastp.c (aarch64_asm_sve2p2_ok)
whilelt_1.c, whilele_1.c (aarch64_asm_sve2p1_ok)
They contain:
/* { dg-do assemble { target aarch64_asm_sve2p2_ok } } */
/* { dg-do compile { target { ! aarch64_asm_sve2p2_ok } } } */
...
/* { dg-final { check-function-bodies "**" "" } } */
or scan-assembler/scan-assembler-times finals.
When the effective target is true, dg-do assemble is selected. Assemble
mode produces a .o file but does not leave the .s file, so
check-function-bodies and scan-assembler report:
<test>: output file does not exist
UNRESOLVED: ... check-function-bodies test1
...
Reproduce:
make -C BUILD/gcc -k check \
RUNTESTFLAGS="gcc.target/aarch64/sve2/acle/aarch64-sve2-acle.exp"
with binutils whose as supports SVE2.1/SVE2.2.
Fix: add -save-temps to the dg-options of the four tests, as other
assemble-mode scan tests do, so the .s file is available to the scan
directives. Tested on aarch64 with binutils 2.47.50: 44 PASS and no
UNRESOLVED for the four tests.