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:
Janus Weil 2018-05-22 07:41:45 +02:00
parent 9687412cec
commit 286f737cf0
28 changed files with 182 additions and 157 deletions

View File

@ -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> 2018-05-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/85841 PR fortran/85841

View File

@ -533,7 +533,7 @@ gfc_match_array_spec (gfc_array_spec **asp, bool match_dim, bool match_codim)
as->type = AS_ASSUMED_RANK; as->type = AS_ASSUMED_RANK;
as->rank = -1; 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; goto cleanup;
if (!match_codim) if (!match_codim)

View File

@ -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)) if (!kind_value_check (stat, stat_no, gfc_default_integer_kind))
return 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)) gfc_current_intrinsic, &stat->where))
return false; 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)) if (!variable_check (stat, 2, false))
return 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)) gfc_current_intrinsic, &stat->where))
return false; 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)) 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); "at %L to C_F_POINTER: %s", &fptr->where, msg);
return true; return true;
@ -4786,7 +4786,7 @@ gfc_check_c_f_procpointer (gfc_expr *cptr, gfc_expr *fptr)
} }
if (!attr.is_bind_c) 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); "pointer at %L to C_F_PROCPOINTER", &fptr->where);
return true; return true;
@ -4829,7 +4829,7 @@ gfc_check_c_funloc (gfc_expr *x)
} }
if (!attr.is_bind_c) 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); "at %L to C_FUNLOC", &x->where);
return true; return true;
} }
@ -4883,7 +4883,7 @@ gfc_check_c_loc (gfc_expr *x)
} }
if (x->rank if (x->rank
&& !gfc_notify_std (GFC_STD_F2008_TS, && !gfc_notify_std (GFC_STD_F2018,
"Noninteroperable array at %L as" "Noninteroperable array at %L as"
" argument to C_LOC: %s", &x->where, msg)) " argument to C_LOC: %s", &x->where, msg))
return false; return false;
@ -5267,7 +5267,7 @@ gfc_check_num_images (gfc_expr *distance, gfc_expr *failed)
if (!scalar_check (distance, 0)) if (!scalar_check (distance, 0))
return false; 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)) "NUM_IMAGES at %L", &distance->where))
return false; return false;
} }
@ -5280,7 +5280,7 @@ gfc_check_num_images (gfc_expr *distance, gfc_expr *failed)
if (!scalar_check (failed, 1)) if (!scalar_check (failed, 1))
return false; 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)) "NUM_IMAGES at %L", &failed->where))
return false; return false;
} }
@ -5366,7 +5366,7 @@ gfc_check_this_image (gfc_expr *coarray, gfc_expr *dim, gfc_expr *distance)
if (!scalar_check (distance, 2)) if (!scalar_check (distance, 2))
return false; 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)) "THIS_IMAGE at %L", &distance->where))
return false; return false;

View File

@ -1401,7 +1401,7 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
not have the allocatable, pointer, or optional attributes, not have the allocatable, pointer, or optional attributes,
according to J3/04-007, section 5.1. */ according to J3/04-007, section 5.1. */
if (sym->attr.allocatable == 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 " "ALLOCATABLE attribute in procedure %qs "
"with BIND(C)", sym->name, "with BIND(C)", sym->name,
&(sym->declared_at), &(sym->declared_at),
@ -1409,7 +1409,7 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
retval = false; retval = false;
if (sym->attr.pointer == 1 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 " "POINTER attribute in procedure %qs "
"with BIND(C)", sym->name, "with BIND(C)", sym->name,
&(sym->declared_at), &(sym->declared_at),
@ -1434,7 +1434,7 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
retval = false; retval = false;
} }
else if (sym->attr.optional == 1 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 " "at %L with OPTIONAL attribute in "
"procedure %qs which is BIND(C)", "procedure %qs which is BIND(C)",
sym->name, &(sym->declared_at), 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 either assumed size or explicit shape. Deferred shape is already
covered by the pointer/allocatable attribute. */ covered by the pointer/allocatable attribute. */
if (sym->as != NULL && sym->as->type == AS_ASSUMED_SHAPE 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) " "at %L as dummy argument to the BIND(C) "
"procedure %qs at %L", sym->name, "procedure %qs at %L", sym->name,
&(sym->declared_at), &(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"); gfc_error ("Assumed type at %C is not allowed for components");
return MATCH_ERROR; return MATCH_ERROR;
} }
if (!gfc_notify_std (GFC_STD_F2008_TS, "Assumed type " if (!gfc_notify_std (GFC_STD_F2018, "Assumed type at %C"))
"at %C"))
return MATCH_ERROR; return MATCH_ERROR;
ts->type = BT_ASSUMED; ts->type = BT_ASSUMED;
return MATCH_YES; return MATCH_YES;

View File

@ -855,8 +855,6 @@ notify_std_msg(int std)
return _("Fortran 2018 obsolescent feature:"); return _("Fortran 2018 obsolescent feature:");
else if (std & GFC_STD_F2018) else if (std & GFC_STD_F2018)
return _("Fortran 2018:"); return _("Fortran 2018:");
else if (std & GFC_STD_F2008_TS)
return "TS 29113/TS 18508:";
else if (std & GFC_STD_F2008_OBS) else if (std & GFC_STD_F2008_OBS)
return _("Fortran 2008 obsolescent feature:"); return _("Fortran 2008 obsolescent feature:");
else if (std & GFC_STD_F2008) else if (std & GFC_STD_F2008)

View File

@ -533,8 +533,7 @@ Specification @code{Further Interoperability of Fortran with C}
(ISO/IEC TS 29113:2012). Full support of those standards and future (ISO/IEC TS 29113:2012). Full support of those standards and future
Fortran standards is planned. The current status of the support is Fortran standards is planned. The current status of the support is
can be found in the @ref{Fortran 2003 status}, @ref{Fortran 2008 can be found in the @ref{Fortran 2003 status}, @ref{Fortran 2008
status}, @ref{TS 29113 status}, @ref{TS 18508 status} and @ref{Fortran status} and @ref{Fortran 2018 status} sections of the documentation.
2018 status} sections of the documentation.
Additionally, the GNU Fortran compilers supports the OpenMP specification Additionally, the GNU Fortran compilers supports the OpenMP specification
(version 4.0 and most of the features of the 4.5 version, (version 4.0 and most of the features of the 4.5 version,
@ -793,8 +792,6 @@ compile option was used.
@menu @menu
* Fortran 2003 status:: * Fortran 2003 status::
* Fortran 2008 status:: * Fortran 2008 status::
* TS 29113 status::
* TS 18508 status::
* Fortran 2018 status:: * Fortran 2018 status::
@end menu @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 @node Fortran 2018 status
@section Status of Fortran 2018 support @section Status of Fortran 2018 support
@ -1168,6 +1114,55 @@ specifier now conforms to Fortran 2018.
@end itemize @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 ---------------------------------------------------------------------
@c Compiler Characteristics @c Compiler Characteristics
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------

View File

@ -1849,7 +1849,7 @@ add_functions (void)
mo, BT_UNKNOWN, 0, REQUIRED); mo, BT_UNKNOWN, 0, REQUIRED);
add_sym_2 ("failed_images", GFC_ISYM_FAILED_IMAGES, CLASS_TRANSFORMATIONAL, 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_check_failed_or_stopped_images,
gfc_simplify_failed_or_stopped_images, gfc_simplify_failed_or_stopped_images,
gfc_resolve_failed_images, team, BT_VOID, di, OPTIONAL, 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); make_generic ("getpid", GFC_ISYM_GETPID, GFC_STD_GNU);
add_sym_1 ("get_team", GFC_ISYM_GET_TEAM, CLASS_TRANSFORMATIONAL, 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, gfc_check_get_team, NULL, gfc_resolve_get_team,
level, BT_INTEGER, di, OPTIONAL); level, BT_INTEGER, di, OPTIONAL);
@ -2102,7 +2102,7 @@ add_functions (void)
ca, BT_REAL, dr, REQUIRED, sub, BT_INTEGER, ii, REQUIRED); ca, BT_REAL, dr, REQUIRED, sub, BT_INTEGER, ii, REQUIRED);
add_sym_2 ("image_status", GFC_ISYM_IMAGE_STATUS, CLASS_ELEMENTAL, ACTUAL_NO, 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, gfc_simplify_image_status, gfc_resolve_image_status, image,
BT_INTEGER, di, REQUIRED, team, BT_VOID, di, OPTIONAL); 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); make_generic ("range", GFC_ISYM_RANGE, GFC_STD_F95);
add_sym_1 ("rank", GFC_ISYM_RANK, CLASS_INQUIRY, ACTUAL_NO, BT_INTEGER, di, 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); 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, 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, 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); make_generic ("stat", GFC_ISYM_STAT, GFC_STD_GNU);
add_sym_2 ("stopped_images", GFC_ISYM_STOPPED_IMAGES, CLASS_TRANSFORMATIONAL, 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_check_failed_or_stopped_images,
gfc_simplify_failed_or_stopped_images, gfc_simplify_failed_or_stopped_images,
gfc_resolve_stopped_images, team, BT_VOID, di, OPTIONAL, 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); make_generic ("tanh", GFC_ISYM_TANH, GFC_STD_F77);
add_sym_1 ("team_number", GFC_ISYM_TEAM_NUMBER, CLASS_TRANSFORMATIONAL, 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, gfc_check_team_number, NULL, gfc_resolve_team_number,
team, BT_DERIVED, di, OPTIONAL); team, BT_DERIVED, di, OPTIONAL);
@ -3344,7 +3344,7 @@ add_subroutines (void)
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_5s ("atomic_cas", GFC_ISYM_ATOMIC_CAS, CLASS_ATOMIC, 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, gfc_check_atomic_cas, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_INOUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_INOUT,
"old", BT_INTEGER, di, REQUIRED, INTENT_OUT, "old", BT_INTEGER, di, REQUIRED, INTENT_OUT,
@ -3353,35 +3353,35 @@ add_subroutines (void)
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_3s ("atomic_add", GFC_ISYM_ATOMIC_ADD, CLASS_ATOMIC, 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, gfc_check_atomic_op, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
"value", BT_INTEGER, di, REQUIRED, INTENT_IN, "value", BT_INTEGER, di, REQUIRED, INTENT_IN,
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_3s ("atomic_and", GFC_ISYM_ATOMIC_AND, CLASS_ATOMIC, 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, gfc_check_atomic_op, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
"value", BT_INTEGER, di, REQUIRED, INTENT_IN, "value", BT_INTEGER, di, REQUIRED, INTENT_IN,
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_3s ("atomic_or", GFC_ISYM_ATOMIC_OR, CLASS_ATOMIC, 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, gfc_check_atomic_op, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
"value", BT_INTEGER, di, REQUIRED, INTENT_IN, "value", BT_INTEGER, di, REQUIRED, INTENT_IN,
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_3s ("atomic_xor", GFC_ISYM_ATOMIC_XOR, CLASS_ATOMIC, 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, gfc_check_atomic_op, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
"value", BT_INTEGER, di, REQUIRED, INTENT_IN, "value", BT_INTEGER, di, REQUIRED, INTENT_IN,
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_4s ("atomic_fetch_add", GFC_ISYM_ATOMIC_FETCH_ADD, CLASS_ATOMIC, 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, gfc_check_atomic_fetch_op, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
"value", BT_INTEGER, di, REQUIRED, INTENT_IN, "value", BT_INTEGER, di, REQUIRED, INTENT_IN,
@ -3389,7 +3389,7 @@ add_subroutines (void)
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_4s ("atomic_fetch_and", GFC_ISYM_ATOMIC_FETCH_AND, CLASS_ATOMIC, 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, gfc_check_atomic_fetch_op, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
"value", BT_INTEGER, di, REQUIRED, INTENT_IN, "value", BT_INTEGER, di, REQUIRED, INTENT_IN,
@ -3397,7 +3397,7 @@ add_subroutines (void)
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_4s ("atomic_fetch_or", GFC_ISYM_ATOMIC_FETCH_OR, CLASS_ATOMIC, 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, gfc_check_atomic_fetch_op, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
"value", BT_INTEGER, di, REQUIRED, INTENT_IN, "value", BT_INTEGER, di, REQUIRED, INTENT_IN,
@ -3405,7 +3405,7 @@ add_subroutines (void)
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT); stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
add_sym_4s ("atomic_fetch_xor", GFC_ISYM_ATOMIC_FETCH_XOR, CLASS_ATOMIC, 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, gfc_check_atomic_fetch_op, NULL, NULL,
"atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT,
"value", BT_INTEGER, di, REQUIRED, INTENT_IN, "value", BT_INTEGER, di, REQUIRED, INTENT_IN,
@ -3419,7 +3419,7 @@ add_subroutines (void)
tm, BT_REAL, dr, REQUIRED, INTENT_OUT); tm, BT_REAL, dr, REQUIRED, INTENT_OUT);
add_sym_3s ("event_query", GFC_ISYM_EVENT_QUERY, CLASS_ATOMIC, 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, gfc_check_event_query, NULL, gfc_resolve_event_query,
"event", BT_INTEGER, di, REQUIRED, INTENT_IN, "event", BT_INTEGER, di, REQUIRED, INTENT_IN,
c, BT_INTEGER, di, OPTIONAL, INTENT_IN, c, BT_INTEGER, di, OPTIONAL, INTENT_IN,
@ -3609,7 +3609,7 @@ add_subroutines (void)
/* Coarray collectives. */ /* Coarray collectives. */
add_sym_4s ("co_broadcast", GFC_ISYM_CO_BROADCAST, CLASS_IMPURE, 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, gfc_check_co_broadcast, NULL, NULL,
a, BT_REAL, dr, REQUIRED, INTENT_INOUT, a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
"source_image", BT_INTEGER, di, REQUIRED, INTENT_IN, "source_image", BT_INTEGER, di, REQUIRED, INTENT_IN,
@ -3617,7 +3617,7 @@ add_subroutines (void)
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT); errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
add_sym_4s ("co_max", GFC_ISYM_CO_MAX, CLASS_IMPURE, 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, gfc_check_co_minmax, NULL, NULL,
a, BT_REAL, dr, REQUIRED, INTENT_INOUT, a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN, result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
@ -3625,7 +3625,7 @@ add_subroutines (void)
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT); errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
add_sym_4s ("co_min", GFC_ISYM_CO_MIN, CLASS_IMPURE, 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, gfc_check_co_minmax, NULL, NULL,
a, BT_REAL, dr, REQUIRED, INTENT_INOUT, a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN, result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
@ -3633,7 +3633,7 @@ add_subroutines (void)
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT); errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
add_sym_4s ("co_sum", GFC_ISYM_CO_SUM, CLASS_IMPURE, 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, gfc_check_co_sum, NULL, NULL,
a, BT_REAL, dr, REQUIRED, INTENT_INOUT, a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN, result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
@ -3641,7 +3641,7 @@ add_subroutines (void)
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT); errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
add_sym_5s ("co_reduce", GFC_ISYM_CO_REDUCE, CLASS_IMPURE, 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, gfc_check_co_reduce, NULL, NULL,
a, BT_REAL, dr, REQUIRED, INTENT_INOUT, a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
"operator", BT_INTEGER, di, REQUIRED, INTENT_IN, "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"; symstd_msg = "new in Fortran 2008";
break; break;
case GFC_STD_F2008_TS: case GFC_STD_F2018:
symstd_msg = "new in TS 29113/TS 18508"; symstd_msg = "new in Fortran 2018";
break; break;
case GFC_STD_GNU: case GFC_STD_GNU:

View File

@ -481,10 +481,9 @@ conformance to the Fortran 95, Fortran 2003, Fortran 2008 and Fortran
2018 standards, respectively; errors are given for all extensions 2018 standards, respectively; errors are given for all extensions
beyond the relevant language standard, and warnings are given for the beyond the relevant language standard, and warnings are given for the
Fortran 77 features that are permitted but obsolescent in later Fortran 77 features that are permitted but obsolescent in later
standards. @samp{-std=f2008ts} allows the Fortran 2008 standard standards. The deprecated option @samp{-std=f2008ts} acts as an alias for
including the additions of the Technical Specification (TS) 29113 on @samp{-std=f2018}. It is only present for backwards compatibility with
Further Interoperability of Fortran with C and TS 18508 on Additional earlier gfortran versions and should not be used any more.
Parallel Features in Fortran.
@item -ftest-forall-temp @item -ftest-forall-temp
@opindex @code{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 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 warning to be issued if a tab is encountered. Note, @option{-Wtabs} is
active for @option{-pedantic}, @option{-std=f95}, @option{-std=f2003}, 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}. @option{-Wall}.
@item -Wundefined-do-loop @item -Wundefined-do-loop

View File

@ -66,7 +66,7 @@ NAMED_INTCST (ISOCBINDING_INTMAX_T, "c_intmax_t", \
NAMED_INTCST (ISOCBINDING_INTPTR_T, "c_intptr_t", \ NAMED_INTCST (ISOCBINDING_INTPTR_T, "c_intptr_t", \
get_int_kind_from_name (INTPTR_TYPE), GFC_STD_F2003) get_int_kind_from_name (INTPTR_TYPE), GFC_STD_F2003)
NAMED_INTCST (ISOCBINDING_PTRDIFF_T, "c_ptrdiff_t", \ 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", \ NAMED_INTCST (ISOCBINDING_SIZE_T, "c_size_t", \
gfc_index_integer_kind, GFC_STD_F2003) gfc_index_integer_kind, GFC_STD_F2003)
NAMED_INTCST (ISOCBINDING_SIGNED_CHAR, "c_signed_char", \ NAMED_INTCST (ISOCBINDING_SIGNED_CHAR, "c_signed_char", \

View File

@ -86,7 +86,7 @@ NAMED_INTCST (ISOFORTRANENV_FILE_STAT_LOCKED_OTHER_IMAGE, \
NAMED_INTCST (ISOFORTRANENV_FILE_STAT_STOPPED_IMAGE, "stat_stopped_image", \ NAMED_INTCST (ISOFORTRANENV_FILE_STAT_STOPPED_IMAGE, "stat_stopped_image", \
GFC_STAT_STOPPED_IMAGE, GFC_STD_F2008) GFC_STAT_STOPPED_IMAGE, GFC_STD_F2008)
NAMED_INTCST (ISOFORTRANENV_FILE_STAT_FAILED_IMAGE, "stat_failed_image", \ 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", \ NAMED_INTCST (ISOFORTRANENV_FILE_STAT_UNLOCKED, "stat_unlocked", \
GFC_STAT_UNLOCKED, GFC_STD_F2008) 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", \ NAMED_DERIVED_TYPE (ISOFORTRAN_EVENT_TYPE, "event_type", \
flag_coarray == GFC_FCOARRAY_LIB flag_coarray == GFC_FCOARRAY_LIB
? get_int_kind_from_node (ptr_type_node) ? 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", \ NAMED_DERIVED_TYPE (ISOFORTRAN_TEAM_TYPE, "team_type", \
flag_coarray == GFC_FCOARRAY_LIB flag_coarray == GFC_FCOARRAY_LIB
? get_int_kind_from_node (ptr_type_node) ? 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_INTCST
#undef NAMED_KINDARRAY #undef NAMED_KINDARRAY

View File

@ -22,10 +22,9 @@ along with GCC; see the file COPYING3. If not see
Note that no features were obsoleted nor deleted in F2003. Note that no features were obsoleted nor deleted in F2003.
Please remember to keep those definitions in sync with Please remember to keep those definitions in sync with
gfortran.texi. */ gfortran.texi. */
#define GFC_STD_F2018_DEL (1<<12) /* Deleted in F2018. */ #define GFC_STD_F2018_DEL (1<<11) /* Deleted in F2018. */
#define GFC_STD_F2018_OBS (1<<11) /* Obsolescent in F2018. */ #define GFC_STD_F2018_OBS (1<<10) /* Obsolescent in F2018. */
#define GFC_STD_F2018 (1<<10) /* New in F2018. */ #define GFC_STD_F2018 (1<<9) /* New in F2018. */
#define GFC_STD_F2008_TS (1<<9) /* POST-F2008 technical reports. */
#define GFC_STD_F2008_OBS (1<<8) /* Obsolescent in F2008. */ #define GFC_STD_F2008_OBS (1<<8) /* Obsolescent in F2008. */
#define GFC_STD_F2008 (1<<7) /* New in F2008. */ #define GFC_STD_F2008 (1<<7) /* New in F2008. */
#define GFC_STD_LEGACY (1<<6) /* Backward compatibility. */ #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) | GFC_STD_F2018_DEL)
#define GFC_STD_OPT_F03 (GFC_STD_OPT_F95 | GFC_STD_F2003) #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_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_F08 | GFC_STD_F2018) \
#define GFC_STD_OPT_F18 ((GFC_STD_OPT_F08TS | GFC_STD_F2018) \
& (~GFC_STD_F2018_DEL)) & (~GFC_STD_F2018_DEL))
/* Bitmasks for the various FPE that can be enabled. These need to be straight integers /* Bitmasks for the various FPE that can be enabled. These need to be straight integers

View File

@ -3322,7 +3322,7 @@ cleanup:
match match
gfc_match_event_post (void) 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 MATCH_ERROR;
return event_statement (ST_EVENT_POST); return event_statement (ST_EVENT_POST);
@ -3332,7 +3332,7 @@ gfc_match_event_post (void)
match match
gfc_match_event_wait (void) 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 MATCH_ERROR;
return event_statement (ST_EVENT_WAIT); return event_statement (ST_EVENT_WAIT);
@ -3344,7 +3344,7 @@ gfc_match_event_wait (void)
match match
gfc_match_fail_image (void) 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; return MATCH_ERROR;
if (gfc_match_char ('(') == MATCH_YES) if (gfc_match_char ('(') == MATCH_YES)
@ -3368,7 +3368,7 @@ gfc_match_form_team (void)
match m; match m;
gfc_expr *teamid,*team; 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; return MATCH_ERROR;
if (gfc_match_char ('(') == MATCH_NO) if (gfc_match_char ('(') == MATCH_NO)
@ -3407,7 +3407,7 @@ gfc_match_change_team (void)
match m; match m;
gfc_expr *team; 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; return MATCH_ERROR;
if (gfc_match_char ('(') == MATCH_NO) if (gfc_match_char ('(') == MATCH_NO)
@ -3437,7 +3437,7 @@ syntax:
match match
gfc_match_end_team (void) 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; return MATCH_ERROR;
if (gfc_match_char ('(') == MATCH_YES) if (gfc_match_char ('(') == MATCH_YES)
@ -3461,7 +3461,7 @@ gfc_match_sync_team (void)
match m; match m;
gfc_expr *team; 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; return MATCH_ERROR;
if (gfc_match_char ('(') == MATCH_NO) if (gfc_match_char ('(') == MATCH_NO)

View File

@ -42,7 +42,7 @@ set_default_std_flags (void)
{ {
gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL 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_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_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; 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; break;
case OPT_std_f2008ts: 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: case OPT_std_f2018:
gfc_option.allow_std = GFC_STD_OPT_F18; gfc_option.allow_std = GFC_STD_OPT_F18;
gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS

View File

@ -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> 2018-05-21 Christian Groessler <chris@groessler.org>
* gcc.c-torture/compile/simd-5.c: Fix comment. * gcc.c-torture/compile/simd-5.c: Fix comment.

View File

@ -5,5 +5,5 @@
! !
! !
subroutine foo(x) 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 end subroutine foo

View File

@ -6,5 +6,5 @@
! Test TYPE(*) ! Test TYPE(*)
subroutine one(a) subroutine one(a)
type(*) :: a ! { dg-error "TS 29113/TS 18508: Assumed type" } type(*) :: a ! { dg-error "Fortran 2018: Assumed type" }
end subroutine one end subroutine one

View File

@ -5,11 +5,11 @@ use, intrinsic :: iso_c_binding
implicit none implicit none
contains 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 integer(c_int), dimension(:) :: assumed_array
end subroutine sub0 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(:) integer(c_int), pointer :: deferred_array(:)
end subroutine sub1 end subroutine sub1
end module bind_c_array_params end module bind_c_array_params

View File

@ -8,11 +8,11 @@ type, bind(C) :: cstruct
integer :: i integer :: i
end type end type
interface 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 import :: c_float, cstruct
real(c_float), pointer :: this(:) real(c_float), pointer :: this(:)
end subroutine psub 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 import :: c_float, cstruct
type(cstruct), allocatable :: that(:) type(cstruct), allocatable :: that(:)
end subroutine psub2 end subroutine psub2

View File

@ -8,9 +8,9 @@ contains
subroutine sub0() bind(c) subroutine sub0() bind(c)
type(c_funptr) :: my_c_funptr 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 end subroutine sub0
subroutine sub1() subroutine sub1()

View File

@ -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_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." } 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" } cfp = c_funloc (noCsub) ! { dg-error "Fortran 2018: 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" } call c_f_procpointer (cfp, fint) ! { dg-error "Fortran 2018: Noninteroperable procedure pointer at .1. to C_F_PROCPOINTER" }
end end

View File

@ -43,7 +43,7 @@ contains
integer(c_int), intent(in) :: handle integer(c_int), intent(in) :: handle
get_foo_address = c_loc(foo_pool(handle)%v) 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 end function get_foo_address

View File

@ -6,15 +6,15 @@ implicit none
intrinsic :: atomic_define intrinsic :: atomic_define
intrinsic :: atomic_ref intrinsic :: atomic_ref
intrinsic :: atomic_cas ! { 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 TS 29113/TS 18508." } 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 TS 29113/TS 18508." } 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 TS 29113/TS 18508." } 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 TS 29113/TS 18508." } 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 TS 29113/TS 18508." } 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 TS 29113/TS 18508." } 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 TS 29113/TS 18508." } 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 TS 29113/TS 18508." } intrinsic :: atomic_fetch_xor ! { dg-error "not available in the current standard settings but new in Fortran 2018." }
integer(atomic_int_kind) :: caf[*], var integer(atomic_int_kind) :: caf[*], var
logical(atomic_logical_kind) :: caf_log[*], var2 logical(atomic_logical_kind) :: caf_log[*], var2
integer :: stat integer :: stat

View File

@ -6,6 +6,6 @@
! !
program test program test
implicit none implicit none
intrinsic co_reduce ! { 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 TS 29113/TS 18508." } intrinsic co_broadcast ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
end program test end program test

View File

@ -6,6 +6,6 @@
! !
program test program test
implicit none implicit none
intrinsic co_reduce ! { 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 TS 29113/TS 18508." } intrinsic co_broadcast ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
end program test end program test

View File

@ -6,7 +6,7 @@
! !
program test program test
implicit none implicit none
intrinsic co_max ! { 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 TS 29113/TS 18508." } 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 TS 29113/TS 18508." } intrinsic co_sum ! { dg-error "is not available in the current standard settings but new in Fortran 2018." }
end program test end program test

View File

@ -1,5 +1,5 @@
! { dg-do compile } ! { dg-do compile }
! { dg-options "-std=f2008ts" } ! { dg-options "-std=f2008" }
! !
! F2018 permits ERROR STOP in PURE procedures ! F2018 permits ERROR STOP in PURE procedures
! !

View File

@ -1,5 +1,5 @@
! { dg-do compile } ! { dg-do compile }
! { dg-options "-std=f2008ts" } ! { dg-options "-std=f2008" }
! !
! Support Fortran 2018's IMPLICIT NONE with spec list ! Support Fortran 2018's IMPLICIT NONE with spec list
! (currently implemented as vendor extension) ! (currently implemented as vendor extension)

View File

@ -3,5 +3,5 @@
! !
! PR fortran/48820 ! PR fortran/48820
! !
intrinsic :: rank ! { dg-error "new in TS 29113" } intrinsic :: rank ! { dg-error "new in Fortran 2018" }
end end