mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
Fortran: Evaluate all functions on the source image.
Formerly pure elemental functions were evaluated in the caf_accessor. This had so many dependencies that there was no benefit. Evaluate every function on the calling side now, which has the benefit, that only one temporary has to be created instead of argument many. PR fortran/121043 gcc/fortran/ChangeLog: * coarray.cc (check_add_new_component): Evaluate all functions on the source image. * trans-decl.cc (gfc_build_builtin_function_decls): The only argument of team_number() is of type void* in the library ABI.
This commit is contained in:
committed by
Jerry DeLisle
parent
94b543f43d
commit
ede3dd56e6
@@ -696,21 +696,11 @@ 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)))
|
||||
/* Treat non-pure/non-elemental functions. */
|
||||
check_add_new_comp_handle_array (e, type, add_data);
|
||||
else
|
||||
for (gfc_actual_arglist *actual = e->value.function.actual; actual;
|
||||
actual = actual->next)
|
||||
check_add_new_component (type, actual->expr, add_data);
|
||||
check_add_new_comp_handle_array (e, type, add_data);
|
||||
break;
|
||||
case EXPR_VARIABLE:
|
||||
check_add_new_comp_handle_array (e, type, add_data);
|
||||
break;
|
||||
check_add_new_comp_handle_array (e, type, add_data);
|
||||
break;
|
||||
case EXPR_ARRAY:
|
||||
case EXPR_PPC:
|
||||
case EXPR_STRUCTURE:
|
||||
|
||||
@@ -4312,10 +4312,9 @@ gfc_build_builtin_function_decls (void)
|
||||
get_identifier (PREFIX ("caf_sync_team")), ". r w w w ", void_type_node,
|
||||
4, pvoid_type_node, pint_type, pchar_type_node, size_type_node);
|
||||
|
||||
gfor_fndecl_caf_team_number
|
||||
= gfc_build_library_function_decl_with_spec (
|
||||
get_identifier (PREFIX("caf_team_number")), ". r ",
|
||||
integer_type_node, 1, integer_type_node);
|
||||
gfor_fndecl_caf_team_number = gfc_build_library_function_decl_with_spec (
|
||||
get_identifier (PREFIX ("caf_team_number")), ". r ", integer_type_node,
|
||||
1, pvoid_type_node);
|
||||
|
||||
gfor_fndecl_caf_image_status = gfc_build_library_function_decl_with_spec (
|
||||
get_identifier (PREFIX ("caf_image_status")), ". r r ",
|
||||
|
||||
Reference in New Issue
Block a user