[flang] Document non-standard use of larger INTEGER for sizes
authorpeter klausler <pklausler@nvidia.com>
Mon, 8 Jul 2019 17:44:14 +0000 (10:44 -0700)
committerpeter klausler <pklausler@nvidia.com>
Mon, 8 Jul 2019 17:44:14 +0000 (10:44 -0700)
Original-commit: flang-compiler/f18@edc79c4257079378df534247858832dba7a35920
Reviewed-on: https://github.com/flang-compiler/f18/pull/553
Tree-same-pre-rewrite: false

flang/documentation/Extensions.md

index bf744a7..b77ee4b 100644 (file)
@@ -12,6 +12,17 @@ Other non-standard features, which do conflict with the current
 standard specification of the Fortran programming language, are
 accepted if enabled by command-line options.
 
+Intentional violations of the standard
+======================================
+* The default `INTEGER` type is required by the standard to occupy
+  the same amount of storage as the default `REAL` type.  Default
+  `REAL` is of course 32-bit IEEE-754 floating-point today.  This legacy
+  rule imposes an artificially small constraint in some cases
+  where Fortran mandates that something have the default `INTEGER`
+  type: array bounds, `CHARACTER` length, subscripts, and the results
+  of intrinsic function references that return such things.  We
+  use `INTEGER(KIND=8)` for such things.
+
 Extensions, deletions, and legacy features supported by default
 ===============================================================
 * Tabs in source