llvm-project/flang/docs
peter klausler 3265b93363 [flang] Extension: reduced scope for some implied DO loop indices
The index of an implied DO loop in a DATA statement or array
constructor is defined by Fortran 2018 to have scope over its
implied DO loop.  This definition is unfortunate, because it
requires the implied DO loop's bounds expressions to be in the
scope of the index variable.  Consequently, in code like

  integer, parameter :: j = 5
  real, save :: a(5) = [(j, j=1, j)]

the upper bound of the loop is a reference to the index variable,
not the parameter in the enclosing scope.

This patch limits the scope of the index variable to the "body"
of the implied DO loop as one would naturally expect, with a warning.
I would have preferred to make this a hard error, but most Fortran
compilers treat this case as f18 now does.  If the standard
were to be fixed, the warning could be made optional.

Differential Revision: https://reviews.llvm.org/D108595
2021-08-24 09:34:18 -07:00
..
_static
_templates [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
_themes/llvm-theme
ArrayComposition.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
BijectiveInternalNameUniquing.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
C++17.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
C++style.md [flang] Add clang-tidy check for braces around if 2021-06-16 09:13:53 +00:00
CMakeLists.txt
Calls.md [docs][flang] Fix typos 2020-09-21 11:05:58 +05:30
Character.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
ControlFlowGraph.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
Directives.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
DoConcurrent.md [flang] Document DO CONCURRENT's problems (NFC) 2020-11-12 15:30:43 -08:00
Extensions.md [flang] Extension: reduced scope for some implied DO loop indices 2021-08-24 09:34:18 -07:00
FlangDriver.md [flang][docs] Document the `flang` wrapper script 2021-08-06 12:45:32 +00:00
FortranFeatureHistory.md [flang] (NFC) Document Fortran feature history 2021-04-22 11:24:22 -07:00
FortranForCProgrammers.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
FortranIR.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
FortranLLVMTestSuite.md [flang][docs] Minor update to Fortran LLVM Tests-suite docs. 2021-06-28 10:01:29 -05:00
GettingInvolved.md [Flang][Docs] Update meeting URL 2021-07-07 10:35:35 -05:00
IORuntimeInternals.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
ImplementingASemanticCheck.md [flang][driver] Delete `f18` (i.e. the old Flang driver) 2021-08-05 12:57:15 +00:00
Intrinsics.md [flang] Tighten rules to resolve procedure as intrinsic procedure 2020-10-26 11:25:40 +01:00
LabelResolution.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
ModFiles.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
OpenMP-4.5-grammar.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
OpenMP-semantics.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
OptionComparison.md Update OptionComparison.md 2020-11-20 10:33:21 -08:00
Overview.md [flang][driver] Delete `f18` (i.e. the old Flang driver) 2021-08-05 12:57:15 +00:00
ParserCombinators.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
Parsing.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
Preprocessing.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
PullRequestChecklist.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
ReleaseNotes.md [flang] Convert release notes to markdown 2020-09-08 08:47:33 +01:00
RuntimeDescriptor.md [flang] Add new documentation main page 2020-09-11 14:19:51 +01:00
RuntimeTypeInfo.md [flang] Implement derived type description table encoding 2020-12-08 10:26:58 -08:00
Semantics.md [flang] Improve initializer semantics, esp. for component default values 2020-12-07 14:40:41 -08:00
conf.py [Flang][Docs] Fix warnings when building docs. 2020-11-10 22:24:49 +05:30
doxygen-mainpage.dox [flang] Fix link to old repo location in doxygen mainpage. NFC. 2020-09-07 16:43:08 +01:00
doxygen.cfg.in
f2018-grammar.md [flang] Correct handling of null pointer initializers 2020-11-18 13:57:25 -08:00
flang-c-style.el [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
index.md [flang][docs] Initial documentation for the Fortran LLVM Test Suite. 2021-05-26 15:59:55 -05:00