block-stmt [block-specification-part] block end-block-stmt
R1108 block-stmt -> [block-construct-name :] BLOCK
R1109 block-specification-part ->
- [use-stmt]... [import-stmt]... [implicit-part]
+ [use-stmt]... [import-stmt]...
[[declaration-construct]... specification-construct]
R1110 end-block-stmt -> END BLOCK [block-construct-name]
R1111 change-team-construct -> change-team-stmt block end-change-team-stmt
// Fortran has five kinds of intrinsic data, and the derived types.
ENUM_CLASS(TypeCategory, Integer, Real, Complex, Character, Logical, Derived)
-static constexpr bool IsNumeric(TypeCategory cat) {
- return cat <= TypeCategory::Complex;
-}
-
// Kinds of IMPORT statements. Default means IMPORT or IMPORT :: names.
ENUM_CLASS(ImportKind, Default, Only, None, All)
WRAPPER_CLASS(EndBlockStmt, std::optional<Name>);
// R1109 block-specification-part ->
-// [use-stmt]... [import-stmt]... [implicit-part]
+// [use-stmt]... [import-stmt]...
// [[declaration-construct]... specification-construct]
WRAPPER_CLASS(BlockSpecificationPart, SpecificationPart);
+// TODO: Because BlockSpecificationPart just wraps the more general
+// SpecificationPart, it can misrecognize an ImplicitPart as part of
+// the BlockSpecificationPart during parsing, and we have to detect and
+// flag such usage in semantics.
// TODO: error if any COMMON, EQUIVALENCE, INTENT, NAMELIST, OPTIONAL,
// VALUE, ENTRY, SAVE /common/, or statement function definition statement
// appears in a block-specification part (C1107, C1570).