aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-08-25 22:35:21 +0200
committerJakub Jelinek <jakub@redhat.com>2021-08-25 22:35:57 +0200
commit1ab84eda5548119908c4e24c6ad953dd7c00a5b7 (patch)
treec3775826d008eb9bf901d8ce4c35f98bec0415a0 /gcc/gimple-range.cc
parent5c85f29537662f1f4195a102cbf0182ffa32d8ac (diff)
downloadgcc-1ab84eda5548119908c4e24c6ad953dd7c00a5b7.zip
gcc-1ab84eda5548119908c4e24c6ad953dd7c00a5b7.tar.gz
gcc-1ab84eda5548119908c4e24c6ad953dd7c00a5b7.tar.bz2
c++: Fix up value initialization of structs with zero width bitfields [PR102019]
The removal of remove_zero_width_bit_fields, in addition to triggering some ABI issues that need solving anyway (ABI incompatibility between C and C++) also resulted in UB inside of gcc, we now call build_zero_init which calls build_int_cst on an integral type with TYPE_PRECISION of 0. Fixed by ignoring the zero width bitfields. I understand build_value_init_noctor wants to initialize to 0 even unnamed bitfields (of non-zero width), at least until we have some CONSTRUCTOR flag that says that even all the padding bits should be cleared. 2021-08-25 Jakub Jelinek <jakub@redhat.com> PR c++/102019 * init.c (build_value_init_noctor): Ignore unnamed zero-width bitfields.
Diffstat (limited to 'gcc/gimple-range.cc')
0 files changed, 0 insertions, 0 deletions