diff options
author | Martin Uecker <uecker@tugraz.at> | 2023-12-22 17:32:34 +0100 |
---|---|---|
committer | Martin Uecker <uecker@tugraz.at> | 2023-12-30 22:32:51 +0100 |
commit | 38c33fd2b5967f52144226a19f761fac8f85ea32 (patch) | |
tree | d9dbaecf15695059ce9027f470bb84515de74d44 /ChangeLog | |
parent | 77f30e22f179f23e85ab4ab09209aca33190f30c (diff) |
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.cc (tagged_types_tu_compatible_p): Revise.
gcc/testsuite:
* gcc.dg/c23-tag-9.c: New test.
Diffstat (limited to 'ChangeLog')
0 files changed, 0 insertions, 0 deletions