re PR fortran/54107 ([F03] Memory hog with abstract interface)
[gcc.git] / gcc / tree-sra.c
index e5fbcf2c5c5ffb352e295763059e6d12191fa243..234dde22da16766e403453480f344dfaae82d2b0 100644 (file)
@@ -2199,7 +2199,9 @@ analyze_access_subtree (struct access *root, struct access *parent,
     {
       if (allow_replacements
          && scalar && !root->first_child
-         && (root->grp_scalar_write || root->grp_assignment_write))
+         && (root->grp_scalar_write || root->grp_assignment_write)
+         && !bitmap_bit_p (cannot_scalarize_away_bitmap,
+                           DECL_UID (root->base)))
        {
          gcc_checking_assert (!root->grp_scalar_read
                               && !root->grp_assignment_read);