aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-05-23 10:15:35 +0200
committerEric Botcazou <ebotcazou@adacore.com>2023-05-23 10:17:13 +0200
commit50143b85bd90a2e06c0dd192a966574a3279c463 (patch)
tree769c6056f19f54b5de7993a5af034e8fe943ffe6 /gcc/c/c-decl.cc
parent61285c4805bc4fff417e9eb034f91a4d0dc2d335 (diff)
downloadgcc-50143b85bd90a2e06c0dd192a966574a3279c463.zip
gcc-50143b85bd90a2e06c0dd192a966574a3279c463.tar.gz
gcc-50143b85bd90a2e06c0dd192a966574a3279c463.tar.bz2
Fix handling of non-integral bit-fields in native_encode_initializer
The encoder for CONSTRUCTORs assumes that all bit-fields (DECL_BIT_FIELD) have integral types, but that's not the case in Ada where they may have pretty much any type, resulting in a wrong encoding for them gcc/ * fold-const.cc (native_encode_initializer) <CONSTRUCTOR>: Apply the specific treatment for bit-fields only if they have an integral type and filter out non-integral bit-fields that do not start and end on a byte boundary. gcc/testsuite/ * gnat.dg/opt101.adb: New test. * gnat.dg/opt101_pkg.ads: New helper.
Diffstat (limited to 'gcc/c/c-decl.cc')
0 files changed, 0 insertions, 0 deletions