From: Nathaniel Shead Date: Fri, 22 Aug 2025 03:47:43 +0000 (+1000) Subject: testsuite: Fix g++.dg/abi/mangle83.C for -fshort-enums X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62beefc4750fc141b008706121b784c64625f808;p=thirdparty%2Fgcc.git testsuite: Fix g++.dg/abi/mangle83.C for -fshort-enums 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 --- diff --git a/gcc/testsuite/g++.dg/abi/mangle83.C b/gcc/testsuite/g++.dg/abi/mangle83.C index 4f05d663ab8..ed68656f8c5 100644 --- a/gcc/testsuite/g++.dg/abi/mangle83.C +++ b/gcc/testsuite/g++.dg/abi/mangle83.C @@ -7,9 +7,9 @@ template int Frob () { return int (V); } enum { A = (unsigned int)12345, B = 0 }; template int Frob (); template int Frob (); -// { 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;