[Bug fortran/30372] various intrinsics do not diagnose invalid argument kinds
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jun 20 17:34:54 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30372
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #10 from kargl at gcc dot gnu.org ---
The non-standard SLEEP intrinsic subroutine is documented as taking a default
integer argument. This patch enforces this restriction.
Index: gcc/fortran/check.c
===================================================================
--- gcc/fortran/check.c (revision 280157)
+++ gcc/fortran/check.c (working copy)
@@ -5588,6 +5588,9 @@ gfc_check_sleep_sub (gfc_expr *seconds)
if (!scalar_check (seconds, 0))
return false;
+ if (!kind_value_check (seconds, 0, gfc_default_integer_kind))
+ return false;
+
return true;
}
More information about the Gcc-bugs
mailing list