diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2025-04-09 14:49:14 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2025-04-09 14:49:14 +0200 |
commit | 3e3b665cc77791f2e088aeee124d8a9fb7f6eb41 (patch) | |
tree | e6d42f3c47aa4a897e5c4232564b94a8d3b123ea /gcc/fortran/openmp.cc | |
parent | 24d1832e0d6edce4f6f717135fcec65d6939e199 (diff) | |
download | gcc-3e3b665cc77791f2e088aeee124d8a9fb7f6eb41.zip gcc-3e3b665cc77791f2e088aeee124d8a9fb7f6eb41.tar.gz gcc-3e3b665cc77791f2e088aeee124d8a9fb7f6eb41.tar.bz2 |
d: Use CONSTRUCTOR_ZERO_PADDING_BITS in the D FE [PR117832]
Adds a new wrapper function for `build_constructor', and calls it
instead to ensure that all CONSTRUCTOR nodes explicitly created by the
front-end have CONSTRUCTOR_ZERO_PADDING_BITS set.
Some places may not be necessary as it's guaranteed for there to be no
padding in the type, such as D dynamic arrays. Other places this gets
turned into a double-memset when optimizations are turned off, as the
front-end already generates a memset call to zero out all padding on
initializing a variable. The optimizer sees through this so will
correctly clear all bits once, so this can be improved later as-needed.
PR d/117832
gcc/d/ChangeLog:
* d-tree.h (build_padded_constructor): New prototype.
* d-codegen.cc (build_padded_constructor): New function.
(d_array_value): Call it.
(build_memset_call): Likewise.
(build_struct_literal): Likewise.
(underlying_complex_expr): Likewise.
(build_array_from_val): Likewise.
(build_array_from_exprs): Likewise.
(d_build_call): Likewise.
(get_frame_for_symbol): Likewise.
* d-convert.cc (convert_for_rvalue): Likewise.
(convert_for_assignment): Likewise.
* decl.cc (class DeclVisitor): Likewise.
* expr.cc (class ExprVisitor): Likewise.
* modules.cc (layout_moduleinfo): Likewise.
* typeinfo.cc (class TypeInfoVisitor): Likewise.
Diffstat (limited to 'gcc/fortran/openmp.cc')
0 files changed, 0 insertions, 0 deletions