https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121894
--- Comment #10 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to qinzhao from comment #8)
> in tree-sra.cc, for the following stmt:
> s = {};
>
> for the above lhs "s", the field "grp_assignment_write" of the created
> struct access is 1;
>
> however, for the following stmt:
> s= .DEFERRED_INIT (8, 2, &"s"[0]);
>
> for the above lhs "s", the field "grp_assignment_write" of the created
> struct access is 0;
>
> This difference is the root cause for this issue.
> will check how to fix this for the call to .DEFERRED_INIT.
You can most likely set it in scan_function() at eactly the same place
where IFN_DEFERRED_INIT is already handled specially.