aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-03-31 18:18:32 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2020-03-31 19:03:04 +0200
commite8e0acbaa38ed57b4cbf9e60556f78a059ba2c0b (patch)
tree2b0a1176388e6ba4d442efc370ed2e919ce95eb9 /libcpp
parentf14b41d27124601284347a10d496362c8b4b8e1c (diff)
downloadgcc-e8e0acbaa38ed57b4cbf9e60556f78a059ba2c0b.zip
gcc-e8e0acbaa38ed57b4cbf9e60556f78a059ba2c0b.tar.gz
gcc-e8e0acbaa38ed57b4cbf9e60556f78a059ba2c0b.tar.bz2
d: Use memset to fill alignment holes with zeroes.
This patch removes the manual insertion of padding for fields in constructed struct literals, and instead uses memset() on the declaration being initialized. When compiling optimized builds, the intent is usually missed, and alignment holes end up with non-zero values in them anyway. gcc/d/ChangeLog: PR d/94424 * d-codegen.cc (build_alignment_field): Remove. (build_struct_literal): Don't insert alignment padding. * expr.cc (ExprVisitor::visit (AssignExp *)): Call memset before assigning struct literals. gcc/testsuite/ChangeLog: PR d/94424 * gdc.dg/pr94424.d: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions