If the default CPU under testing merely supports Thumb2, but doesn't
default to it, thumb2-pop-loreg.c fails because the expected pop
instruction won't be found.  Enable -mthumb explicitly.

Regstrapped on x86_64-linux-gnu.  Also tested with aarch64-elf and
arm-eabi with gcc-15.  Ok to install?


for  gcc/testsuite/ChangeLog

        * gcc.target/arm/thumb2-pop-loreg.c: Enable -mthumb.
---
 gcc/testsuite/gcc.target/arm/thumb2-pop-loreg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/arm/thumb2-pop-loreg.c 
b/gcc/testsuite/gcc.target/arm/thumb2-pop-loreg.c
index c8397f64318fb..1284a4d72f8d0 100644
--- a/gcc/testsuite/gcc.target/arm/thumb2-pop-loreg.c
+++ b/gcc/testsuite/gcc.target/arm/thumb2-pop-loreg.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb2_ok } */
-/* { dg-options "-Os" } */
+/* { dg-options "-Os -mthumb" } */
 
 int __attribute__((noinline)) f (void)
 {

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to