https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121975

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, the DECL_EXPR gimplification which adds the .DEFERRED_INIT call is pretty
dumb, it simply adds it for all automatic vars which don't have DECL_INITIAL
set and don't have uninitialized or indeterminate attributes.
One possible hack around it would be to temporarily or permanently add e.g. the
uninitialized attribute to the OpenMP/OpenACC loop iterators (if they are
integrals or pointers) because omp expansion guarantees they are always
initialized (note, for class type iterators that is not the case, they are
constructed possibly using user provided constructors and those might not
initialize everything in the class).  So e.g. C++26 would require such a
.DEFERRED_INIT call or something that initializes the bytes of the class to
some constant.
Or the code that is upset by the extra .DEFERRED_INIT calls could ignore those
calls for the iterators.

Reply via email to