On 28/01/2026 03:41, Andrew Pinski wrote:
On Tue, Jan 27, 2026 at 3:54 AM Karl Meakin <[email protected]> wrote:
The assembly tests in `cmpbr.c` were failing when run with an old
version of `gas` which did not recognise the extension. Fix by gating on
the extension being supported by the assembler.

Also change `cmpbr-3.c` from `dg-do assemble` to `dg-do compile` since
it is not testing the assembled binary.

gcc/testsuite/ChangeLog:

         * gcc.target/aarch64/cmpbr-3.c: `dg-do assemble` => `dg-do compile`.
         * gcc.target/aarch64/cmpbr.c: Gate on `+cmpbr` assembler support.
---
  gcc/testsuite/gcc.target/aarch64/cmpbr-3.c | 2 +-
  gcc/testsuite/gcc.target/aarch64/cmpbr.c   | 1 +
  2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/aarch64/cmpbr-3.c 
b/gcc/testsuite/gcc.target/aarch64/cmpbr-3.c
index a4f12deef27..ab0ba481621 100644
--- a/gcc/testsuite/gcc.target/aarch64/cmpbr-3.c
+++ b/gcc/testsuite/gcc.target/aarch64/cmpbr-3.c
@@ -1,4 +1,4 @@
-/* { dg-do assemble } */
+/* { dg-do compile } */
  /* { dg-options "-O2" } */

  #pragma GCC target "+cmpbr"
diff --git a/gcc/testsuite/gcc.target/aarch64/cmpbr.c 
b/gcc/testsuite/gcc.target/aarch64/cmpbr.c
index 23f462f7db1..228aca7fbbd 100644
--- a/gcc/testsuite/gcc.target/aarch64/cmpbr.c
+++ b/gcc/testsuite/gcc.target/aarch64/cmpbr.c
@@ -1,6 +1,7 @@
  // Test that the instructions added by FEAT_CMPBR are emitted
  // { dg-do compile }
  // { dg-options "-march=armv9.5-a+cmpbr -O2" }
+// { dg-require-effective-target aarch64_asm_cmpbr_ok }
This testcase is `dg-do compile` so I am not sure how/why
aarch64_asm_cmpbr_ok is needed here?
Thanks, I forgot to remove that line. Fixed in the next revision.
  // { dg-final { check-function-bodies "**" "*/" "" { target *-*-* } 
{\.L[0-9]+} } }

  #include <stdint.h>
--
2.43.0


Reply via email to