diff options
author | Jason Merrill <jason@redhat.com> | 2020-07-09 15:11:12 -0400 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:17:15 -0300 |
commit | 2f58b9e7f21eaa87abf3f6b65e4d9285574020e5 (patch) | |
tree | 27c2a017568206dd91bf0f4dfd18780dc777b990 /gcc/fortran/interface.c | |
parent | 515fc8e5e768b4e9fec4d54f4f405484d9cab1b1 (diff) | |
download | gcc-2f58b9e7f21eaa87abf3f6b65e4d9285574020e5.zip gcc-2f58b9e7f21eaa87abf3f6b65e4d9285574020e5.tar.gz gcc-2f58b9e7f21eaa87abf3f6b65e4d9285574020e5.tar.bz2 |
c++: [[no_unique_address]] fixes. [PR96105]
We were wrongly checking is_empty_class on the result of strip_array_types
rather than the actual field type. We weren't considering the alignment of
the data member. We needed to handle unions the same way as
layout_nonempty_base_or_field.
gcc/cp/ChangeLog:
PR c++/96105
PR c++/96052
PR c++/95976
* class.c (check_field_decls): An array of empty classes is not an
empty data member.
(layout_empty_base_or_field): Handle explicit alignment.
Fix union handling.
gcc/testsuite/ChangeLog:
PR c++/96105
PR c++/96052
PR c++/95976
* g++.dg/cpp2a/no_unique_address4.C: New test.
* g++.dg/cpp2a/no_unique_address5.C: New test.
* g++.dg/cpp2a/no_unique_address6.C: New test.
Diffstat (limited to 'gcc/fortran/interface.c')
0 files changed, 0 insertions, 0 deletions