https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81978
--- Comment #3 from anlauf at gcc dot gnu.org --- Created attachment 60198 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60198&action=edit Draft patch This patch fixes the issue by preventing the write-back to read-only memory of the actual argument is a parameter and the formal argument has no intent specified. The resulting behavior agrees with every other compiler I tried... An alternative (more aggressive?) solution is to move this change into gfc_conv_subref_array_arg, but this means auditing lots of uses.