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. Pushed to trunk as obvious. 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 <dimi...@dinux.eu> --- gcc/testsuite/g++.dg/modules/class-11_a.H | 1 + gcc/testsuite/g++.dg/modules/class-11_b.C | 1 + 2 files changed, 2 insertions(+) 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"; -- 2.50.1