+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
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)
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;
}
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;
}
}
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;
}
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;
}
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;
}
}
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;
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;
}
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;
}
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;
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),
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),
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),
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),
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;
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)
(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,
@menu
* Fortran 2003 status::
* Fortran 2008 status::
-* TS 29113 status::
-* TS 18508 status::
* Fortran 2018 status::
@end menu
-@node TS 29113 status
-@section Technical Specification 29113 Status
+@node Fortran 2018 status
+@section Status of Fortran 2018 support
+
+So far very little work has been done to support Fortran 2018.
+
+@itemize
+@item ERROR STOP in a PURE procedure
+An @code{ERROR STOP} statement is permitted in a @code{PURE}
+procedure.
+
+@item IMPLICIT NONE with a spec-list
+Support the @code{IMPLICIT NONE} statement with an
+@code{implicit-none-spec-list}.
+
+@item Behavior of INQUIRE with the RECL= specifier
+
+The behavior of the @code{INQUIRE} statement with the @code{RECL=}
+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.
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.}
@end itemize
-@node TS 18508 status
-@section Technical Specification 18508 Status
+
+@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:
@end itemize
-@node Fortran 2018 status
-@section Status of Fortran 2018 support
-
-So far very little work has been done to support Fortran 2018.
-
-@itemize
-@item ERROR STOP in a PURE procedure
-An @code{ERROR STOP} statement is permitted in a @code{PURE}
-procedure.
-
-@item IMPLICIT NONE with a spec-list
-Support the @code{IMPLICIT NONE} statement with an
-@code{implicit-none-spec-list}.
-
-@item Behavior of INQUIRE with the RECL= specifier
-
-The behavior of the @code{INQUIRE} statement with the @code{RECL=}
-specifier now conforms to Fortran 2018.
-
-@end itemize
-
@c ---------------------------------------------------------------------
@c Compiler Characteristics
@c ---------------------------------------------------------------------
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,
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);
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);
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,
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,
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);
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,
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,
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,
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,
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,
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,
/* 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,
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,
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,
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,
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,
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:
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}
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
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", \
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)
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
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. */
| 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
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);
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);
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)
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)
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)
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)
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)
{
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;
}
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
+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.
!
!
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
! 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
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
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
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()
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
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
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
!
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
!
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
!
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
! { dg-do compile }
-! { dg-options "-std=f2008ts" }
+! { dg-options "-std=f2008" }
!
! F2018 permits ERROR STOP in PURE procedures
!
! { 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)
!
! PR fortran/48820
!
-intrinsic :: rank ! { dg-error "new in TS 29113" }
+intrinsic :: rank ! { dg-error "new in Fortran 2018" }
end