On Wed, 27 Dec 2023, Martin Uecker wrote: > This patch hopefully fixes the test failure we see with gnu23-tag-4.c. > It does for me locally with -march=native (which otherwise reproduces > the problem). > > Bootstrapped and regession tested on x86_64 > > > C: Fix type compatibility for structs with variable sized fields. > > This fixes the test gcc.dg/gnu23-tag-4.c introduced by commit 23fee88f > which fails for -march=... because the DECL_FIELD_BIT_OFFSET are set > inconsistently for types with and without variable-sized field. This > is fixed by testing for DECL_ALIGN instead. The code is further > simplified by removing some unnecessary conditions, i.e. anon_field is > set unconditionaly and all fields are assumed to be DECL_FIELDs. > > gcc/c: > * c-typeck.c (tagged_types_tu_compatible_p): Revise. > > gcc/testsuite: > * gcc.dg./c23-tag-9.c: New test.
OK. -- Joseph S. Myers jos...@codesourcery.com