re PR fortran/85841 ([F2018] reject deleted features)
2018-05-22 Janus Weil <janus@gcc.gnu.org> PR fortran/85841 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and GFC_STD_OPT_F08TS. * error.c (notify_std_msg): Remove GFC_STD_F2008_TS. * options.c (set_default_std_flags): Ditto. (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018. * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by GFC_STD_F2018. * check.c (gfc_check_atomic, gfc_check_event_query, gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto. * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto. * intrinsic.c (add_functions, add_subroutines, gfc_check_intrinsic_standard): Ditto. * iso-c-binding.def: Ditto. * iso-fortran-env.def: Ditto. * match.c (gfc_match_event_post, gfc_match_event_wait, gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team, gfc_match_end_team, gfc_match_sync_team): Ditto. * gfortran.texi: Remove mention of -std=f2008ts. Move TSs into F2018 section. * invoke.texi: Update documentation of -std=f2008ts. 2018-05-22 Janus Weil <janus@gcc.gnu.org> PR fortran/85841 * gfortran.dg/assumed_rank_5.f90: Update error message. * gfortran.dg/assumed_type_4.f90: Ditto. * gfortran.dg/bind_c_array_params.f03: Ditto. * gfortran.dg/bind_c_usage_28.f90: Ditto. * gfortran.dg/c_funloc_tests_5.f03: Ditto. * gfortran.dg/c_funloc_tests_6.f90: Ditto. * gfortran.dg/c_loc_tests_11.f03: Ditto. * gfortran.dg/coarray_atomic_2.f90: Ditto. * gfortran.dg/coarray_collectives_2.f90: Ditto. * gfortran.dg/coarray_collectives_10.f90: Ditto. * gfortran.dg/coarray_collectives_13.f90: Ditto. * gfortran.dg/rank_3.f90: Ditto. * gfortran.dg/error_stop_4.f90: Replace -std=f2008ts by -std=f2008. * gfortran.dg/implicit_14.f90: Ditto. From-SVN: r260499
This commit is contained in:
parent
9687412cec
commit
286f737cf0
@ -1,3 +1,28 @@
|
||||
2018-05-22 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/85841
|
||||
* libgfortran.h: Remove the macros GFC_STD_F2008_TS and
|
||||
GFC_STD_OPT_F08TS.
|
||||
* error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
|
||||
* options.c (set_default_std_flags): Ditto.
|
||||
(gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
|
||||
* array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
|
||||
GFC_STD_F2018.
|
||||
* check.c (gfc_check_atomic, gfc_check_event_query,
|
||||
gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
|
||||
gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
|
||||
* decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
|
||||
* intrinsic.c (add_functions, add_subroutines,
|
||||
gfc_check_intrinsic_standard): Ditto.
|
||||
* iso-c-binding.def: Ditto.
|
||||
* iso-fortran-env.def: Ditto.
|
||||
* match.c (gfc_match_event_post, gfc_match_event_wait,
|
||||
gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
|
||||
gfc_match_end_team, gfc_match_sync_team): Ditto.
|
||||
* gfortran.texi: Remove mention of -std=f2008ts.
|
||||
Move TSs into F2018 section.
|
||||
* invoke.texi: Update documentation of -std=f2008ts.
|
||||
|
||||
2018-05-21 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/85841
|
||||
|
@ -533,7 +533,7 @@ gfc_match_array_spec (gfc_array_spec **asp, bool match_dim, bool match_codim)
|
||||
as->type = AS_ASSUMED_RANK;
|
||||
as->rank = -1;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "Assumed-rank array at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "Assumed-rank array at %C"))
|
||||
goto cleanup;
|
||||
|
||||
if (!match_codim)
|
||||
|
@ -1136,7 +1136,7 @@ gfc_check_atomic (gfc_expr *atom, int atom_no, gfc_expr *value, int val_no,
|
||||
if (!kind_value_check (stat, stat_no, gfc_default_integer_kind))
|
||||
return false;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "STAT= argument to %s at %L",
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "STAT= argument to %s at %L",
|
||||
gfc_current_intrinsic, &stat->where))
|
||||
return false;
|
||||
}
|
||||
@ -1349,7 +1349,7 @@ gfc_check_event_query (gfc_expr *event, gfc_expr *count, gfc_expr *stat)
|
||||
if (!variable_check (stat, 2, false))
|
||||
return false;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "STAT= argument to %s at %L",
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "STAT= argument to %s at %L",
|
||||
gfc_current_intrinsic, &stat->where))
|
||||
return false;
|
||||
}
|
||||
@ -4745,7 +4745,7 @@ gfc_check_c_f_pointer (gfc_expr *cptr, gfc_expr *fptr, gfc_expr *shape)
|
||||
}
|
||||
|
||||
if (fptr->rank > 0 && !is_c_interoperable (fptr, &msg, false, true))
|
||||
return gfc_notify_std (GFC_STD_F2008_TS, "Noninteroperable array FPTR "
|
||||
return gfc_notify_std (GFC_STD_F2018, "Noninteroperable array FPTR "
|
||||
"at %L to C_F_POINTER: %s", &fptr->where, msg);
|
||||
|
||||
return true;
|
||||
@ -4786,7 +4786,7 @@ gfc_check_c_f_procpointer (gfc_expr *cptr, gfc_expr *fptr)
|
||||
}
|
||||
|
||||
if (!attr.is_bind_c)
|
||||
return gfc_notify_std (GFC_STD_F2008_TS, "Noninteroperable procedure "
|
||||
return gfc_notify_std (GFC_STD_F2018, "Noninteroperable procedure "
|
||||
"pointer at %L to C_F_PROCPOINTER", &fptr->where);
|
||||
|
||||
return true;
|
||||
@ -4829,7 +4829,7 @@ gfc_check_c_funloc (gfc_expr *x)
|
||||
}
|
||||
|
||||
if (!attr.is_bind_c)
|
||||
return gfc_notify_std (GFC_STD_F2008_TS, "Noninteroperable procedure "
|
||||
return gfc_notify_std (GFC_STD_F2018, "Noninteroperable procedure "
|
||||
"at %L to C_FUNLOC", &x->where);
|
||||
return true;
|
||||
}
|
||||
@ -4883,7 +4883,7 @@ gfc_check_c_loc (gfc_expr *x)
|
||||
}
|
||||
|
||||
if (x->rank
|
||||
&& !gfc_notify_std (GFC_STD_F2008_TS,
|
||||
&& !gfc_notify_std (GFC_STD_F2018,
|
||||
"Noninteroperable array at %L as"
|
||||
" argument to C_LOC: %s", &x->where, msg))
|
||||
return false;
|
||||
@ -5267,7 +5267,7 @@ gfc_check_num_images (gfc_expr *distance, gfc_expr *failed)
|
||||
if (!scalar_check (distance, 0))
|
||||
return false;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "DISTANCE= argument to "
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "DISTANCE= argument to "
|
||||
"NUM_IMAGES at %L", &distance->where))
|
||||
return false;
|
||||
}
|
||||
@ -5280,7 +5280,7 @@ gfc_check_num_images (gfc_expr *distance, gfc_expr *failed)
|
||||
if (!scalar_check (failed, 1))
|
||||
return false;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "FAILED= argument to "
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "FAILED= argument to "
|
||||
"NUM_IMAGES at %L", &failed->where))
|
||||
return false;
|
||||
}
|
||||
@ -5366,7 +5366,7 @@ gfc_check_this_image (gfc_expr *coarray, gfc_expr *dim, gfc_expr *distance)
|
||||
if (!scalar_check (distance, 2))
|
||||
return false;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "DISTANCE= argument to "
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "DISTANCE= argument to "
|
||||
"THIS_IMAGE at %L", &distance->where))
|
||||
return false;
|
||||
|
||||
|
@ -1401,7 +1401,7 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
|
||||
not have the allocatable, pointer, or optional attributes,
|
||||
according to J3/04-007, section 5.1. */
|
||||
if (sym->attr.allocatable == 1
|
||||
&& !gfc_notify_std (GFC_STD_F2008_TS, "Variable %qs at %L with "
|
||||
&& !gfc_notify_std (GFC_STD_F2018, "Variable %qs at %L with "
|
||||
"ALLOCATABLE attribute in procedure %qs "
|
||||
"with BIND(C)", sym->name,
|
||||
&(sym->declared_at),
|
||||
@ -1409,7 +1409,7 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
|
||||
retval = false;
|
||||
|
||||
if (sym->attr.pointer == 1
|
||||
&& !gfc_notify_std (GFC_STD_F2008_TS, "Variable %qs at %L with "
|
||||
&& !gfc_notify_std (GFC_STD_F2018, "Variable %qs at %L with "
|
||||
"POINTER attribute in procedure %qs "
|
||||
"with BIND(C)", sym->name,
|
||||
&(sym->declared_at),
|
||||
@ -1434,7 +1434,7 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
|
||||
retval = false;
|
||||
}
|
||||
else if (sym->attr.optional == 1
|
||||
&& !gfc_notify_std (GFC_STD_F2008_TS, "Variable %qs "
|
||||
&& !gfc_notify_std (GFC_STD_F2018, "Variable %qs "
|
||||
"at %L with OPTIONAL attribute in "
|
||||
"procedure %qs which is BIND(C)",
|
||||
sym->name, &(sym->declared_at),
|
||||
@ -1445,7 +1445,7 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
|
||||
either assumed size or explicit shape. Deferred shape is already
|
||||
covered by the pointer/allocatable attribute. */
|
||||
if (sym->as != NULL && sym->as->type == AS_ASSUMED_SHAPE
|
||||
&& !gfc_notify_std (GFC_STD_F2008_TS, "Assumed-shape array %qs "
|
||||
&& !gfc_notify_std (GFC_STD_F2018, "Assumed-shape array %qs "
|
||||
"at %L as dummy argument to the BIND(C) "
|
||||
"procedure %qs at %L", sym->name,
|
||||
&(sym->declared_at),
|
||||
@ -3846,8 +3846,7 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag)
|
||||
gfc_error ("Assumed type at %C is not allowed for components");
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "Assumed type "
|
||||
"at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "Assumed type at %C"))
|
||||
return MATCH_ERROR;
|
||||
ts->type = BT_ASSUMED;
|
||||
return MATCH_YES;
|
||||
|
@ -855,8 +855,6 @@ notify_std_msg(int std)
|
||||
return _("Fortran 2018 obsolescent feature:");
|
||||
else if (std & GFC_STD_F2018)
|
||||
return _("Fortran 2018:");
|
||||
else if (std & GFC_STD_F2008_TS)
|
||||
return "TS 29113/TS 18508:";
|
||||
else if (std & GFC_STD_F2008_OBS)
|
||||
return _("Fortran 2008 obsolescent feature:");
|
||||
else if (std & GFC_STD_F2008)
|
||||
|
@ -533,8 +533,7 @@ Specification @code{Further Interoperability of Fortran with C}
|
||||
(ISO/IEC TS 29113:2012). Full support of those standards and future
|
||||
Fortran standards is planned. The current status of the support is
|
||||
can be found in the @ref{Fortran 2003 status}, @ref{Fortran 2008
|
||||
status}, @ref{TS 29113 status}, @ref{TS 18508 status} and @ref{Fortran
|
||||
2018 status} sections of the documentation.
|
||||
status} and @ref{Fortran 2018 status} sections of the documentation.
|
||||
|
||||
Additionally, the GNU Fortran compilers supports the OpenMP specification
|
||||
(version 4.0 and most of the features of the 4.5 version,
|
||||
@ -793,8 +792,6 @@ compile option was used.
|
||||
@menu
|
||||
* Fortran 2003 status::
|
||||
* Fortran 2008 status::
|
||||
* TS 29113 status::
|
||||
* TS 18508 status::
|
||||
* Fortran 2018 status::
|
||||
@end menu
|
||||
|
||||
@ -1096,57 +1093,6 @@ arrays are supported for named constants (@code{PARAMETER}).
|
||||
|
||||
|
||||
|
||||
@node TS 29113 status
|
||||
@section Technical Specification 29113 Status
|
||||
|
||||
GNU Fortran supports some of the new features of the Technical
|
||||
Specification (TS) 29113 on Further Interoperability of Fortran with C.
|
||||
The @uref{https://gcc.gnu.org/wiki/TS29113Status, wiki} has some information
|
||||
about the current TS 29113 implementation status. In particular, the
|
||||
following is implemented.
|
||||
|
||||
See also @ref{Further Interoperability of Fortran with C}.
|
||||
|
||||
@itemize
|
||||
@item The @option{-std=f2008ts} option.
|
||||
|
||||
@item The @code{OPTIONAL} attribute is allowed for dummy arguments
|
||||
of @code{BIND(C) procedures.}
|
||||
|
||||
@item The @code{RANK} intrinsic is supported.
|
||||
|
||||
@item GNU Fortran's implementation for variables with @code{ASYNCHRONOUS}
|
||||
attribute is compatible with TS 29113.
|
||||
|
||||
@item Assumed types (@code{TYPE(*)}).
|
||||
|
||||
@item Assumed-rank (@code{DIMENSION(..)}). However, the array descriptor
|
||||
of the TS is not yet supported.
|
||||
@end itemize
|
||||
|
||||
|
||||
@node TS 18508 status
|
||||
@section Technical Specification 18508 Status
|
||||
|
||||
GNU Fortran supports the following new features of the Technical
|
||||
Specification 18508 on Additional Parallel Features in Fortran:
|
||||
|
||||
@itemize
|
||||
@item The new atomic ADD, CAS, FETCH and ADD/OR/XOR, OR and XOR intrinsics.
|
||||
|
||||
@item The @code{CO_MIN} and @code{CO_MAX} and @code{SUM} reduction intrinsics.
|
||||
And the @code{CO_BROADCAST} and @code{CO_REDUCE} intrinsic, except that those
|
||||
do not support polymorphic types or types with allocatable, pointer or
|
||||
polymorphic components.
|
||||
|
||||
@item Events (@code{EVENT POST}, @code{EVENT WAIT}, @code{EVENT_QUERY})
|
||||
|
||||
@item Failed images (@code{FAIL IMAGE}, @code{IMAGE_STATUS},
|
||||
@code{FAILED_IMAGES}, @code{STOPPED_IMAGES})
|
||||
|
||||
@end itemize
|
||||
|
||||
|
||||
@node Fortran 2018 status
|
||||
@section Status of Fortran 2018 support
|
||||
|
||||
@ -1168,6 +1114,55 @@ specifier now conforms to Fortran 2018.
|
||||
|
||||
@end itemize
|
||||
|
||||
|
||||
@subsection TS 29113 Status (Further Interoperability with C)
|
||||
|
||||
GNU Fortran supports some of the new features of the Technical
|
||||
Specification (TS) 29113 on Further Interoperability of Fortran with C.
|
||||
The @uref{https://gcc.gnu.org/wiki/TS29113Status, wiki} has some information
|
||||
about the current TS 29113 implementation status. In particular, the
|
||||
following is implemented.
|
||||
|
||||
See also @ref{Further Interoperability of Fortran with C}.
|
||||
|
||||
@itemize
|
||||
@item The @code{OPTIONAL} attribute is allowed for dummy arguments
|
||||
of @code{BIND(C) procedures.}
|
||||
|
||||
@item The @code{RANK} intrinsic is supported.
|
||||
|
||||
@item GNU Fortran's implementation for variables with @code{ASYNCHRONOUS}
|
||||
attribute is compatible with TS 29113.
|
||||
|
||||
@item Assumed types (@code{TYPE(*)}).
|
||||
|
||||
@item Assumed-rank (@code{DIMENSION(..)}). However, the array descriptor
|
||||
of the TS is not yet supported.
|
||||
@end itemize
|
||||
|
||||
|
||||
|
||||
@subsection TS 18508 Status (Additional Parallel Features)
|
||||
|
||||
GNU Fortran supports the following new features of the Technical
|
||||
Specification 18508 on Additional Parallel Features in Fortran:
|
||||
|
||||
@itemize
|
||||
@item The new atomic ADD, CAS, FETCH and ADD/OR/XOR, OR and XOR intrinsics.
|
||||
|
||||
@item The @code{CO_MIN} and @code{CO_MAX} and @code{SUM} reduction intrinsics.
|
||||
And the @code{CO_BROADCAST} and @code{CO_REDUCE} intrinsic, except that those
|
||||
do not support polymorphic types or types with allocatable, pointer or
|
||||
polymorphic components.
|
||||
|
||||
@item Events (@code{EVENT POST}, @code{EVENT WAIT}, @code{EVENT_QUERY})
|
||||
|
||||
@item Failed images (@code{FAIL IMAGE}, @code{IMAGE_STATUS},
|
||||
@code{FAILED_IMAGES}, @code{STOPPED_IMAGES})
|
||||
|
||||
@end itemize
|
||||
|
||||
|
||||
@c ---------------------------------------------------------------------
|
||||
@c Compiler Characteristics
|
||||
@c ---------------------------------------------------------------------
|
||||
|
@ -1849,7 +1849,7 @@ add_functions (void)
|
||||
mo, BT_UNKNOWN, 0, REQUIRED);
|
||||
|
||||
add_sym_2 ("failed_images", GFC_ISYM_FAILED_IMAGES, CLASS_TRANSFORMATIONAL,
|
||||
ACTUAL_NO, BT_INTEGER, dd, GFC_STD_F2008_TS,
|
||||
ACTUAL_NO, BT_INTEGER, dd, GFC_STD_F2018,
|
||||
gfc_check_failed_or_stopped_images,
|
||||
gfc_simplify_failed_or_stopped_images,
|
||||
gfc_resolve_failed_images, team, BT_VOID, di, OPTIONAL,
|
||||
@ -1947,7 +1947,7 @@ add_functions (void)
|
||||
make_generic ("getpid", GFC_ISYM_GETPID, GFC_STD_GNU);
|
||||
|
||||
add_sym_1 ("get_team", GFC_ISYM_GET_TEAM, CLASS_TRANSFORMATIONAL,
|
||||
ACTUAL_NO, BT_INTEGER, di, GFC_STD_F2008_TS,
|
||||
ACTUAL_NO, BT_INTEGER, di, GFC_STD_F2018,
|
||||
gfc_check_get_team, NULL, gfc_resolve_get_team,
|
||||
level, BT_INTEGER, di, OPTIONAL);
|
||||
|
||||
@ -2102,7 +2102,7 @@ add_functions (void)
|
||||
ca, BT_REAL, dr, REQUIRED, sub, BT_INTEGER, ii, REQUIRED);
|
||||
|
||||
add_sym_2 ("image_status", GFC_ISYM_IMAGE_STATUS, CLASS_ELEMENTAL, ACTUAL_NO,
|
||||
BT_INTEGER, di, GFC_STD_F2008_TS, gfc_check_image_status,
|
||||
BT_INTEGER, di, GFC_STD_F2018, gfc_check_image_status,
|
||||
gfc_simplify_image_status, gfc_resolve_image_status, image,
|
||||
BT_INTEGER, di, REQUIRED, team, BT_VOID, di, OPTIONAL);
|
||||
|
||||
@ -2715,9 +2715,9 @@ add_functions (void)
|
||||
make_generic ("range", GFC_ISYM_RANGE, GFC_STD_F95);
|
||||
|
||||
add_sym_1 ("rank", GFC_ISYM_RANK, CLASS_INQUIRY, ACTUAL_NO, BT_INTEGER, di,
|
||||
GFC_STD_F2008_TS, gfc_check_rank, gfc_simplify_rank, gfc_resolve_rank,
|
||||
GFC_STD_F2018, gfc_check_rank, gfc_simplify_rank, gfc_resolve_rank,
|
||||
a, BT_REAL, dr, REQUIRED);
|
||||
make_generic ("rank", GFC_ISYM_RANK, GFC_STD_F2008_TS);
|
||||
make_generic ("rank", GFC_ISYM_RANK, GFC_STD_F2018);
|
||||
|
||||
add_sym_2 ("real", GFC_ISYM_REAL, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F77,
|
||||
gfc_check_real, gfc_simplify_real, gfc_resolve_real,
|
||||
@ -3017,7 +3017,7 @@ add_functions (void)
|
||||
make_generic ("stat", GFC_ISYM_STAT, GFC_STD_GNU);
|
||||
|
||||
add_sym_2 ("stopped_images", GFC_ISYM_STOPPED_IMAGES, CLASS_TRANSFORMATIONAL,
|
||||
ACTUAL_NO, BT_INTEGER, dd, GFC_STD_F2008_TS,
|
||||
ACTUAL_NO, BT_INTEGER, dd, GFC_STD_F2018,
|
||||
gfc_check_failed_or_stopped_images,
|
||||
gfc_simplify_failed_or_stopped_images,
|
||||
gfc_resolve_stopped_images, team, BT_VOID, di, OPTIONAL,
|
||||
@ -3070,7 +3070,7 @@ add_functions (void)
|
||||
make_generic ("tanh", GFC_ISYM_TANH, GFC_STD_F77);
|
||||
|
||||
add_sym_1 ("team_number", GFC_ISYM_TEAM_NUMBER, CLASS_TRANSFORMATIONAL,
|
||||
ACTUAL_YES, BT_INTEGER, di, GFC_STD_F2008_TS,
|
||||
ACTUAL_YES, BT_INTEGER, di, GFC_STD_F2018,
|
||||
gfc_check_team_number, NULL, gfc_resolve_team_number,
|
||||
team, BT_DERIVED, di, OPTIONAL);
|
||||
|
||||
@ -3344,7 +3344,7 @@ add_subroutines (void)
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_5s ("atomic_cas", GFC_ISYM_ATOMIC_CAS, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_cas, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_INOUT,
|
||||
"old", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
@ -3353,35 +3353,35 @@ add_subroutines (void)
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_3s ("atomic_add", GFC_ISYM_ATOMIC_ADD, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_op, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
"value", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_3s ("atomic_and", GFC_ISYM_ATOMIC_AND, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_op, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
"value", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_3s ("atomic_or", GFC_ISYM_ATOMIC_OR, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_op, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
"value", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_3s ("atomic_xor", GFC_ISYM_ATOMIC_XOR, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_op, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
"value", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_4s ("atomic_fetch_add", GFC_ISYM_ATOMIC_FETCH_ADD, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_fetch_op, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
"value", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
@ -3389,7 +3389,7 @@ add_subroutines (void)
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_4s ("atomic_fetch_and", GFC_ISYM_ATOMIC_FETCH_AND, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_fetch_op, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
"value", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
@ -3397,7 +3397,7 @@ add_subroutines (void)
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_4s ("atomic_fetch_or", GFC_ISYM_ATOMIC_FETCH_OR, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_fetch_op, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
"value", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
@ -3405,7 +3405,7 @@ add_subroutines (void)
|
||||
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_4s ("atomic_fetch_xor", GFC_ISYM_ATOMIC_FETCH_XOR, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_atomic_fetch_op, NULL, NULL,
|
||||
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
|
||||
"value", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
@ -3419,7 +3419,7 @@ add_subroutines (void)
|
||||
tm, BT_REAL, dr, REQUIRED, INTENT_OUT);
|
||||
|
||||
add_sym_3s ("event_query", GFC_ISYM_EVENT_QUERY, CLASS_ATOMIC,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_event_query, NULL, gfc_resolve_event_query,
|
||||
"event", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
c, BT_INTEGER, di, OPTIONAL, INTENT_IN,
|
||||
@ -3609,7 +3609,7 @@ add_subroutines (void)
|
||||
|
||||
/* Coarray collectives. */
|
||||
add_sym_4s ("co_broadcast", GFC_ISYM_CO_BROADCAST, CLASS_IMPURE,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_co_broadcast, NULL, NULL,
|
||||
a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
|
||||
"source_image", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
@ -3617,7 +3617,7 @@ add_subroutines (void)
|
||||
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_4s ("co_max", GFC_ISYM_CO_MAX, CLASS_IMPURE,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_co_minmax, NULL, NULL,
|
||||
a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
|
||||
result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
|
||||
@ -3625,7 +3625,7 @@ add_subroutines (void)
|
||||
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_4s ("co_min", GFC_ISYM_CO_MIN, CLASS_IMPURE,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_co_minmax, NULL, NULL,
|
||||
a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
|
||||
result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
|
||||
@ -3633,7 +3633,7 @@ add_subroutines (void)
|
||||
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_4s ("co_sum", GFC_ISYM_CO_SUM, CLASS_IMPURE,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_co_sum, NULL, NULL,
|
||||
a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
|
||||
result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
|
||||
@ -3641,7 +3641,7 @@ add_subroutines (void)
|
||||
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
|
||||
|
||||
add_sym_5s ("co_reduce", GFC_ISYM_CO_REDUCE, CLASS_IMPURE,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
|
||||
BT_UNKNOWN, 0, GFC_STD_F2018,
|
||||
gfc_check_co_reduce, NULL, NULL,
|
||||
a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
|
||||
"operator", BT_INTEGER, di, REQUIRED, INTENT_IN,
|
||||
@ -4618,8 +4618,8 @@ gfc_check_intrinsic_standard (const gfc_intrinsic_sym* isym,
|
||||
symstd_msg = "new in Fortran 2008";
|
||||
break;
|
||||
|
||||
case GFC_STD_F2008_TS:
|
||||
symstd_msg = "new in TS 29113/TS 18508";
|
||||
case GFC_STD_F2018:
|
||||
symstd_msg = "new in Fortran 2018";
|
||||
break;
|
||||
|
||||
case GFC_STD_GNU:
|
||||
|
@ -481,10 +481,9 @@ conformance to the Fortran 95, Fortran 2003, Fortran 2008 and Fortran
|
||||
2018 standards, respectively; errors are given for all extensions
|
||||
beyond the relevant language standard, and warnings are given for the
|
||||
Fortran 77 features that are permitted but obsolescent in later
|
||||
standards. @samp{-std=f2008ts} allows the Fortran 2008 standard
|
||||
including the additions of the Technical Specification (TS) 29113 on
|
||||
Further Interoperability of Fortran with C and TS 18508 on Additional
|
||||
Parallel Features in Fortran.
|
||||
standards. The deprecated option @samp{-std=f2008ts} acts as an alias for
|
||||
@samp{-std=f2018}. It is only present for backwards compatibility with
|
||||
earlier gfortran versions and should not be used any more.
|
||||
|
||||
@item -ftest-forall-temp
|
||||
@opindex @code{ftest-forall-temp}
|
||||
@ -994,7 +993,7 @@ of the Fortran Character Set. For continuation lines, a tab followed
|
||||
by a digit between 1 and 9 is supported. @option{-Wtabs} will cause a
|
||||
warning to be issued if a tab is encountered. Note, @option{-Wtabs} is
|
||||
active for @option{-pedantic}, @option{-std=f95}, @option{-std=f2003},
|
||||
@option{-std=f2008}, @option{-std=f2008ts}, @option{-std=f2018} and
|
||||
@option{-std=f2008}, @option{-std=f2018} and
|
||||
@option{-Wall}.
|
||||
|
||||
@item -Wundefined-do-loop
|
||||
|
@ -66,7 +66,7 @@ NAMED_INTCST (ISOCBINDING_INTMAX_T, "c_intmax_t", \
|
||||
NAMED_INTCST (ISOCBINDING_INTPTR_T, "c_intptr_t", \
|
||||
get_int_kind_from_name (INTPTR_TYPE), GFC_STD_F2003)
|
||||
NAMED_INTCST (ISOCBINDING_PTRDIFF_T, "c_ptrdiff_t", \
|
||||
get_int_kind_from_name (PTRDIFF_TYPE), GFC_STD_F2008_TS)
|
||||
get_int_kind_from_name (PTRDIFF_TYPE), GFC_STD_F2018)
|
||||
NAMED_INTCST (ISOCBINDING_SIZE_T, "c_size_t", \
|
||||
gfc_index_integer_kind, GFC_STD_F2003)
|
||||
NAMED_INTCST (ISOCBINDING_SIGNED_CHAR, "c_signed_char", \
|
||||
|
@ -86,7 +86,7 @@ NAMED_INTCST (ISOFORTRANENV_FILE_STAT_LOCKED_OTHER_IMAGE, \
|
||||
NAMED_INTCST (ISOFORTRANENV_FILE_STAT_STOPPED_IMAGE, "stat_stopped_image", \
|
||||
GFC_STAT_STOPPED_IMAGE, GFC_STD_F2008)
|
||||
NAMED_INTCST (ISOFORTRANENV_FILE_STAT_FAILED_IMAGE, "stat_failed_image", \
|
||||
GFC_STAT_FAILED_IMAGE, GFC_STD_F2008_TS)
|
||||
GFC_STAT_FAILED_IMAGE, GFC_STD_F2018)
|
||||
NAMED_INTCST (ISOFORTRANENV_FILE_STAT_UNLOCKED, "stat_unlocked", \
|
||||
GFC_STAT_UNLOCKED, GFC_STD_F2008)
|
||||
|
||||
@ -126,12 +126,12 @@ NAMED_DERIVED_TYPE (ISOFORTRAN_LOCK_TYPE, "lock_type", \
|
||||
NAMED_DERIVED_TYPE (ISOFORTRAN_EVENT_TYPE, "event_type", \
|
||||
flag_coarray == GFC_FCOARRAY_LIB
|
||||
? get_int_kind_from_node (ptr_type_node)
|
||||
: gfc_default_integer_kind, GFC_STD_F2008_TS)
|
||||
: gfc_default_integer_kind, GFC_STD_F2018)
|
||||
|
||||
NAMED_DERIVED_TYPE (ISOFORTRAN_TEAM_TYPE, "team_type", \
|
||||
flag_coarray == GFC_FCOARRAY_LIB
|
||||
? get_int_kind_from_node (ptr_type_node)
|
||||
: gfc_default_integer_kind, GFC_STD_F2008_TS)
|
||||
: gfc_default_integer_kind, GFC_STD_F2018)
|
||||
|
||||
#undef NAMED_INTCST
|
||||
#undef NAMED_KINDARRAY
|
||||
|
@ -22,10 +22,9 @@ along with GCC; see the file COPYING3. If not see
|
||||
Note that no features were obsoleted nor deleted in F2003.
|
||||
Please remember to keep those definitions in sync with
|
||||
gfortran.texi. */
|
||||
#define GFC_STD_F2018_DEL (1<<12) /* Deleted in F2018. */
|
||||
#define GFC_STD_F2018_OBS (1<<11) /* Obsolescent in F2018. */
|
||||
#define GFC_STD_F2018 (1<<10) /* New in F2018. */
|
||||
#define GFC_STD_F2008_TS (1<<9) /* POST-F2008 technical reports. */
|
||||
#define GFC_STD_F2018_DEL (1<<11) /* Deleted in F2018. */
|
||||
#define GFC_STD_F2018_OBS (1<<10) /* Obsolescent in F2018. */
|
||||
#define GFC_STD_F2018 (1<<9) /* New in F2018. */
|
||||
#define GFC_STD_F2008_OBS (1<<8) /* Obsolescent in F2008. */
|
||||
#define GFC_STD_F2008 (1<<7) /* New in F2008. */
|
||||
#define GFC_STD_LEGACY (1<<6) /* Backward compatibility. */
|
||||
@ -44,8 +43,7 @@ along with GCC; see the file COPYING3. If not see
|
||||
| GFC_STD_F2018_DEL)
|
||||
#define GFC_STD_OPT_F03 (GFC_STD_OPT_F95 | GFC_STD_F2003)
|
||||
#define GFC_STD_OPT_F08 (GFC_STD_OPT_F03 | GFC_STD_F2008)
|
||||
#define GFC_STD_OPT_F08TS (GFC_STD_OPT_F08 | GFC_STD_F2008_TS)
|
||||
#define GFC_STD_OPT_F18 ((GFC_STD_OPT_F08TS | GFC_STD_F2018) \
|
||||
#define GFC_STD_OPT_F18 ((GFC_STD_OPT_F08 | GFC_STD_F2018) \
|
||||
& (~GFC_STD_F2018_DEL))
|
||||
|
||||
/* Bitmasks for the various FPE that can be enabled. These need to be straight integers
|
||||
|
@ -3322,7 +3322,7 @@ cleanup:
|
||||
match
|
||||
gfc_match_event_post (void)
|
||||
{
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "EVENT POST statement at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "EVENT POST statement at %C"))
|
||||
return MATCH_ERROR;
|
||||
|
||||
return event_statement (ST_EVENT_POST);
|
||||
@ -3332,7 +3332,7 @@ gfc_match_event_post (void)
|
||||
match
|
||||
gfc_match_event_wait (void)
|
||||
{
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "EVENT WAIT statement at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "EVENT WAIT statement at %C"))
|
||||
return MATCH_ERROR;
|
||||
|
||||
return event_statement (ST_EVENT_WAIT);
|
||||
@ -3344,7 +3344,7 @@ gfc_match_event_wait (void)
|
||||
match
|
||||
gfc_match_fail_image (void)
|
||||
{
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "FAIL IMAGE statement at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "FAIL IMAGE statement at %C"))
|
||||
return MATCH_ERROR;
|
||||
|
||||
if (gfc_match_char ('(') == MATCH_YES)
|
||||
@ -3368,7 +3368,7 @@ gfc_match_form_team (void)
|
||||
match m;
|
||||
gfc_expr *teamid,*team;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "FORM TEAM statement at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "FORM TEAM statement at %C"))
|
||||
return MATCH_ERROR;
|
||||
|
||||
if (gfc_match_char ('(') == MATCH_NO)
|
||||
@ -3407,7 +3407,7 @@ gfc_match_change_team (void)
|
||||
match m;
|
||||
gfc_expr *team;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "CHANGE TEAM statement at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "CHANGE TEAM statement at %C"))
|
||||
return MATCH_ERROR;
|
||||
|
||||
if (gfc_match_char ('(') == MATCH_NO)
|
||||
@ -3437,7 +3437,7 @@ syntax:
|
||||
match
|
||||
gfc_match_end_team (void)
|
||||
{
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "END TEAM statement at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "END TEAM statement at %C"))
|
||||
return MATCH_ERROR;
|
||||
|
||||
if (gfc_match_char ('(') == MATCH_YES)
|
||||
@ -3461,7 +3461,7 @@ gfc_match_sync_team (void)
|
||||
match m;
|
||||
gfc_expr *team;
|
||||
|
||||
if (!gfc_notify_std (GFC_STD_F2008_TS, "SYNC TEAM statement at %C"))
|
||||
if (!gfc_notify_std (GFC_STD_F2018, "SYNC TEAM statement at %C"))
|
||||
return MATCH_ERROR;
|
||||
|
||||
if (gfc_match_char ('(') == MATCH_NO)
|
||||
|
@ -42,7 +42,7 @@ set_default_std_flags (void)
|
||||
{
|
||||
gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
|
||||
| GFC_STD_F2003 | GFC_STD_F2008 | GFC_STD_F95 | GFC_STD_F77
|
||||
| GFC_STD_F2008_OBS | GFC_STD_F2008_TS | GFC_STD_GNU | GFC_STD_LEGACY
|
||||
| GFC_STD_F2008_OBS | GFC_STD_GNU | GFC_STD_LEGACY
|
||||
| GFC_STD_F2018 | GFC_STD_F2018_DEL | GFC_STD_F2018_OBS;
|
||||
gfc_option.warn_std = GFC_STD_F2018_DEL | GFC_STD_F95_DEL | GFC_STD_LEGACY;
|
||||
}
|
||||
@ -731,13 +731,6 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
||||
break;
|
||||
|
||||
case OPT_std_f2008ts:
|
||||
gfc_option.allow_std = GFC_STD_OPT_F08TS;
|
||||
gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS;
|
||||
gfc_option.max_identifier_length = 63;
|
||||
warn_ampersand = 1;
|
||||
warn_tabs = 1;
|
||||
break;
|
||||
|
||||
case OPT_std_f2018:
|
||||
gfc_option.allow_std = GFC_STD_OPT_F18;
|
||||
gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS
|
||||
|
@ -1,3 +1,21 @@
|
||||
2018-05-22 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/85841
|
||||
* gfortran.dg/assumed_rank_5.f90: Update error message.
|
||||
* gfortran.dg/assumed_type_4.f90: Ditto.
|
||||
* gfortran.dg/bind_c_array_params.f03: Ditto.
|
||||
* gfortran.dg/bind_c_usage_28.f90: Ditto.
|
||||
* gfortran.dg/c_funloc_tests_5.f03: Ditto.
|
||||
* gfortran.dg/c_funloc_tests_6.f90: Ditto.
|
||||
* gfortran.dg/c_loc_tests_11.f03: Ditto.
|
||||
* gfortran.dg/coarray_atomic_2.f90: Ditto.
|
||||
* gfortran.dg/coarray_collectives_2.f90: Ditto.
|
||||
* gfortran.dg/coarray_collectives_10.f90: Ditto.
|
||||
* gfortran.dg/coarray_collectives_13.f90: Ditto.
|
||||
* gfortran.dg/rank_3.f90: Ditto.
|
||||
* gfortran.dg/error_stop_4.f90: Replace -std=f2008ts by -std=f2008.
|
||||
* gfortran.dg/implicit_14.f90: Ditto.
|
||||
|
||||
2018-05-21 Christian Groessler <chris@groessler.org>
|
||||
|
||||
* gcc.c-torture/compile/simd-5.c: Fix comment.
|
||||
|
@ -5,5 +5,5 @@
|
||||
!
|
||||
!
|
||||
subroutine foo(x)
|
||||
integer :: x(..) ! { dg-error "TS 29113/TS 18508: Assumed-rank array" }
|
||||
integer :: x(..) ! { dg-error "Fortran 2018: Assumed-rank array" }
|
||||
end subroutine foo
|
||||
|
@ -6,5 +6,5 @@
|
||||
! Test TYPE(*)
|
||||
|
||||
subroutine one(a)
|
||||
type(*) :: a ! { dg-error "TS 29113/TS 18508: Assumed type" }
|
||||
type(*) :: a ! { dg-error "Fortran 2018: Assumed type" }
|
||||
end subroutine one
|
||||
|
@ -5,11 +5,11 @@ use, intrinsic :: iso_c_binding
|
||||
implicit none
|
||||
|
||||
contains
|
||||
subroutine sub0(assumed_array) bind(c) ! { dg-error "TS 29113/TS 18508: Assumed-shape array 'assumed_array' at .1. as dummy argument to the BIND.C. procedure 'sub0'" }
|
||||
subroutine sub0(assumed_array) bind(c) ! { dg-error "Fortran 2018: Assumed-shape array 'assumed_array' at .1. as dummy argument to the BIND.C. procedure 'sub0'" }
|
||||
integer(c_int), dimension(:) :: assumed_array
|
||||
end subroutine sub0
|
||||
|
||||
subroutine sub1(deferred_array) bind(c) ! { dg-error "TS 29113/TS 18508: Variable 'deferred_array' at .1. with POINTER attribute in procedure 'sub1' with BIND.C." }
|
||||
subroutine sub1(deferred_array) bind(c) ! { dg-error "Fortran 2018: Variable 'deferred_array' at .1. with POINTER attribute in procedure 'sub1' with BIND.C." }
|
||||
integer(c_int), pointer :: deferred_array(:)
|
||||
end subroutine sub1
|
||||
end module bind_c_array_params
|
||||
|
@ -8,11 +8,11 @@ type, bind(C) :: cstruct
|
||||
integer :: i
|
||||
end type
|
||||
interface
|
||||
subroutine psub(this) bind(c, name='Psub') ! { dg-error "TS 29113/TS 18508: Variable 'this' at .1. with POINTER attribute in procedure 'psub' with BIND.C." }
|
||||
subroutine psub(this) bind(c, name='Psub') ! { dg-error "Fortran 2018: Variable 'this' at .1. with POINTER attribute in procedure 'psub' with BIND.C." }
|
||||
import :: c_float, cstruct
|
||||
real(c_float), pointer :: this(:)
|
||||
end subroutine psub
|
||||
subroutine psub2(that) bind(c, name='Psub2') ! { dg-error "TS 29113/TS 18508: Variable 'that' at .1. with ALLOCATABLE attribute in procedure 'psub2' with BIND.C." }
|
||||
subroutine psub2(that) bind(c, name='Psub2') ! { dg-error "Fortran 2018: Variable 'that' at .1. with ALLOCATABLE attribute in procedure 'psub2' with BIND.C." }
|
||||
import :: c_float, cstruct
|
||||
type(cstruct), allocatable :: that(:)
|
||||
end subroutine psub2
|
||||
|
@ -8,9 +8,9 @@ contains
|
||||
subroutine sub0() bind(c)
|
||||
type(c_funptr) :: my_c_funptr
|
||||
|
||||
my_c_funptr = c_funloc(sub1) ! { dg-error "TS 29113/TS 18508: Noninteroperable procedure at .1. to C_FUNLOC" }
|
||||
my_c_funptr = c_funloc(sub1) ! { dg-error "Fortran 2018: Noninteroperable procedure at .1. to C_FUNLOC" }
|
||||
|
||||
my_c_funptr = c_funloc(func0) ! { dg-error "TS 29113/TS 18508: Noninteroperable procedure at .1. to C_FUNLOC" }
|
||||
my_c_funptr = c_funloc(func0) ! { dg-error "Fortran 2018: Noninteroperable procedure at .1. to C_FUNLOC" }
|
||||
end subroutine sub0
|
||||
|
||||
subroutine sub1()
|
||||
|
@ -26,6 +26,6 @@ cfp = c_loc (int) ! { dg-error "Can't convert TYPE.c_ptr. to TYPE.c_funptr." }
|
||||
call c_f_pointer (cfp, int) ! { dg-error "Argument CPTR at .1. to C_F_POINTER shall have the type TYPE.C_PTR." }
|
||||
call c_f_procpointer (cp, fsub) ! { dg-error "Argument CPTR at .1. to C_F_PROCPOINTER shall have the type TYPE.C_FUNPTR." }
|
||||
|
||||
cfp = c_funloc (noCsub) ! { dg-error "TS 29113/TS 18508: Noninteroperable procedure at .1. to C_FUNLOC" }
|
||||
call c_f_procpointer (cfp, fint) ! { dg-error "TS 29113/TS 18508: Noninteroperable procedure pointer at .1. to C_F_PROCPOINTER" }
|
||||
cfp = c_funloc (noCsub) ! { dg-error "Fortran 2018: Noninteroperable procedure at .1. to C_FUNLOC" }
|
||||
call c_f_procpointer (cfp, fint) ! { dg-error "Fortran 2018: Noninteroperable procedure pointer at .1. to C_F_PROCPOINTER" }
|
||||
end
|
||||
|
@ -43,7 +43,7 @@ contains
|
||||
integer(c_int), intent(in) :: handle
|
||||
get_foo_address = c_loc(foo_pool(handle)%v)
|
||||
|
||||
get_foo_address = c_loc(foo_pool2(handle)%v) ! { dg-error "TS 29113/TS 18508: Noninteroperable array at .1. as argument to C_LOC: Expression is a noninteroperable derived type" }
|
||||
get_foo_address = c_loc(foo_pool2(handle)%v) ! { dg-error "Fortran 2018: Noninteroperable array at .1. as argument to C_LOC: Expression is a noninteroperable derived type" }
|
||||
end function get_foo_address
|
||||
|
||||
|
||||
|
@ -6,15 +6,15 @@ implicit none
|
||||
|
||||
intrinsic :: atomic_define
|
||||
intrinsic :: atomic_ref
|
||||
intrinsic :: atomic_cas ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_add ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_and ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_or ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_xor ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_fetch_add ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_fetch_and ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_fetch_or ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_fetch_xor ! { dg-error "not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic :: atomic_cas ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic :: atomic_add ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic :: atomic_and ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic :: atomic_or ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic :: atomic_xor ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic :: atomic_fetch_add ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic :: atomic_fetch_and ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic :: atomic_fetch_or ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic :: atomic_fetch_xor ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
|
||||
integer(atomic_int_kind) :: caf[*], var
|
||||
logical(atomic_logical_kind) :: caf_log[*], var2
|
||||
integer :: stat
|
||||
|
@ -6,6 +6,6 @@
|
||||
!
|
||||
program test
|
||||
implicit none
|
||||
intrinsic co_reduce ! { dg-error "is not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic co_broadcast ! { dg-error "is not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic co_reduce ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic co_broadcast ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
|
||||
end program test
|
||||
|
@ -6,6 +6,6 @@
|
||||
!
|
||||
program test
|
||||
implicit none
|
||||
intrinsic co_reduce ! { dg-error "is not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic co_broadcast ! { dg-error "is not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic co_reduce ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic co_broadcast ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
|
||||
end program test
|
||||
|
@ -6,7 +6,7 @@
|
||||
!
|
||||
program test
|
||||
implicit none
|
||||
intrinsic co_max ! { dg-error "is not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic co_min ! { dg-error "is not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic co_sum ! { dg-error "is not available in the current standard settings but new in TS 29113/TS 18508." }
|
||||
intrinsic co_max ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic co_min ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
|
||||
intrinsic co_sum ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
|
||||
end program test
|
||||
|
@ -1,5 +1,5 @@
|
||||
! { dg-do compile }
|
||||
! { dg-options "-std=f2008ts" }
|
||||
! { dg-options "-std=f2008" }
|
||||
!
|
||||
! F2018 permits ERROR STOP in PURE procedures
|
||||
!
|
||||
|
@ -1,5 +1,5 @@
|
||||
! { dg-do compile }
|
||||
! { dg-options "-std=f2008ts" }
|
||||
! { dg-options "-std=f2008" }
|
||||
!
|
||||
! Support Fortran 2018's IMPLICIT NONE with spec list
|
||||
! (currently implemented as vendor extension)
|
||||
|
@ -3,5 +3,5 @@
|
||||
!
|
||||
! PR fortran/48820
|
||||
!
|
||||
intrinsic :: rank ! { dg-error "new in TS 29113" }
|
||||
intrinsic :: rank ! { dg-error "new in Fortran 2018" }
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user