Skip to content

Commit 233a776

Browse files
committed
transferred changes for simplify.c
1 parent 02523a8 commit 233a776

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

gcc/fortran/simplify.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,6 +2501,30 @@ gfc_simplify_failed_or_stopped_images (gfc_expr *team ATTRIBUTE_UNUSED,
25012501
}
25022502

25032503

2504+
gfc_expr *
2505+
gfc_simplify_get_team (gfc_expr *level ATTRIBUTE_UNUSED)
2506+
{
2507+
if (flag_coarray == GFC_FCOARRAY_NONE)
2508+
{
2509+
gfc_current_locus = *gfc_current_intrinsic_where;
2510+
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
2511+
return &gfc_bad_expr;
2512+
}
2513+
2514+
if (flag_coarray == GFC_FCOARRAY_SINGLE)
2515+
{
2516+
gfc_expr *result;
2517+
result = gfc_get_array_expr (BT_INTEGER, gfc_default_integer_kind, &gfc_current_locus);
2518+
result->rank = 0;
2519+
return result;
2520+
}
2521+
2522+
/* For fcoarray = lib no simplification is possible, because it is not known
2523+
what images failed or are stopped at compile time. */
2524+
return NULL;
2525+
}
2526+
2527+
25042528
gfc_expr *
25052529
gfc_simplify_float (gfc_expr *a)
25062530
{

0 commit comments

Comments
 (0)