From: Dimitar Dimitrov Date: Sat, 9 Aug 2025 11:01:48 +0000 (+0300) Subject: testsuite: Skip class-11_a.H for default_packed targets X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ad36426c78903953bbd2c248a3096d307013e4a;p=thirdparty%2Fgcc.git testsuite: Skip class-11_a.H for default_packed targets The g++.dg/modules/class-11_a.H test expects structs to have a padding. Skip this test for targets which have packed structs by default. This patch fixes the test for pru-unknown-elf from FAIL to UNSUPPORTED. The test still passes on x86_64-linux-gnu. gcc/testsuite/ChangeLog: * g++.dg/modules/class-11_a.H: Skip test for effective default_packed targets. * g++.dg/modules/class-11_b.C: Ditto. Signed-off-by: Dimitar Dimitrov --- diff --git a/gcc/testsuite/g++.dg/modules/class-11_a.H b/gcc/testsuite/g++.dg/modules/class-11_a.H index 799dbdd733c..43fddb67776 100644 --- a/gcc/testsuite/g++.dg/modules/class-11_a.H +++ b/gcc/testsuite/g++.dg/modules/class-11_a.H @@ -1,6 +1,7 @@ // Check for some additional lang_type flags that we'd missed. // { dg-additional-options "-fmodule-header -fabi-version=21 -Wabi=15" } // { dg-module-cmi {} } +// { dg-skip-if "test assumes that structs have padding" { default_packed } } #if __cpp_trivial_relocatability < 202502L #define trivially_relocatable_if_eligible __trivially_relocatable_if_eligible diff --git a/gcc/testsuite/g++.dg/modules/class-11_b.C b/gcc/testsuite/g++.dg/modules/class-11_b.C index 2450a45c739..87be71a398d 100644 --- a/gcc/testsuite/g++.dg/modules/class-11_b.C +++ b/gcc/testsuite/g++.dg/modules/class-11_b.C @@ -1,4 +1,5 @@ // { dg-additional-options "-fmodules -fabi-version=21 -Wabi=15" } +// { dg-skip-if "test assumes that structs have padding" { default_packed } } import "class-11_a.H";