https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88735
--- Comment #3 from Ev Drikos <drikosev at gmail dot com> --- Created attachment 50129 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50129&action=edit Test Case IMHO, a simple workaround might be a deep copy in 'gfc_trans_scalar_assign' if the LHS is finalizable (not pointer, artificial, or associate variable), just in case it's also somewhere a dummy argument with the intent(out) attribute. If this ok, the value b%x%i should be 124 after the assignment 'a=b' in #0 Hope this helps, Ev. Drikos