]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix g++.dg/abi/mangle83.C for -fshort-enums
authorNathaniel Shead <nathanieloshead@gmail.com>
Fri, 22 Aug 2025 03:47:43 +0000 (13:47 +1000)
committerNathaniel Shead <nathanieloshead@gmail.com>
Fri, 22 Aug 2025 12:18:58 +0000 (22:18 +1000)
Linaro CI informed me that this test fails on ARM thumb-m7-hard-eabi.
This appears to be because the target defaults to -fshort-enums, and so
the mangled names are inaccurate.

This patch just disables the implicit type enum test for this case.

gcc/testsuite/ChangeLog:

* g++.dg/abi/mangle83.C: Disable implicit enum test for
-fshort-enums.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
gcc/testsuite/g++.dg/abi/mangle83.C

index 4f05d663ab8c13724181dad6fb937959d182e287..ed68656f8c5f762527bcb659159a1d82f5687b7f 100644 (file)
@@ -7,9 +7,9 @@ template<auto V> int Frob () { return int (V); }
 enum { A = (unsigned int)12345, B = 0 };
 template int Frob<A> ();
 template int Frob<B> ();
-// { dg-final { scan-assembler {_Z4FrobITnDaLUej1A12345EEiv:} { target c++20 } } }
+// { dg-final { scan-assembler {_Z4FrobITnDaLUej1A12345EEiv:} { target { c++20 && { ! short_enums } } } } }
 // { dg-final { scan-assembler {_Z4FrobITnDaL8._anon_012345EEiv:} { target c++17_down } } }
-// { dg-final { scan-assembler {_Z4FrobITnDaLUej1A0EEiv:} { target c++20 } } }
+// { dg-final { scan-assembler {_Z4FrobITnDaLUej1A0EEiv:} { target { c++20 && { ! short_enums } } } } }
 // { dg-final { scan-assembler {_Z4FrobITnDaL8._anon_00EEiv:} { target c++17_down } } }
 
 enum { C = 5 } typedef X;