]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Andre's tweak devel/gfortran-test
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Tue, 29 Jul 2025 22:49:57 +0000 (15:49 -0700)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Tue, 29 Jul 2025 22:49:57 +0000 (15:49 -0700)
gcc/fortran/ChangeLog:

* coarray.cc (check_add_new_component): Don't do addition checks.

gcc/fortran/coarray.cc

index c611b5399687f967e2f3e121d9b292186ed71d3f..b3271e56ad2028557b5731623ed0b2c5067985a4 100644 (file)
@@ -696,22 +696,6 @@ check_add_new_component (gfc_symbol *type, gfc_expr *e, gfc_symbol *add_data)
            check_add_new_component (type, actual->expr, add_data);
          break;
        case EXPR_FUNCTION:
-         if ((e->symtree->n.sym->attr.pure
-              && e->symtree->n.sym->attr.elemental)
-             || (e->value.function.isym && e->value.function.isym->pure
-                 && e->value.function.isym->elemental))
-           {
-             /* Only allow pure and elemental function calls in a coarray
-                accessor, because all other may have side effects or access
-                pointers, which may not be possible in the accessor running on
-                another host.  */
-             for (gfc_actual_arglist *actual = e->value.function.actual;
-                  actual; actual = actual->next)
-               check_add_new_component (type, actual->expr, add_data);
-           }
-         else
-           /* Extract the expression, evaluate it and add a temporary with its
-              value to the helper structure.  */
            check_add_new_comp_handle_array (e, type, add_data);
          break;
        case EXPR_VARIABLE: