llvm-project/flang/lib
Riccardo Bertossa c2921d148e [flang] SAVE statement should not apply to nested scoping units
SAVE statement, according to 8.6.14, must apply to the same scoping
unit, that excludes nested scoping units. For example, if the SAVE
statement is found in a MODULE, the functions contained in that module
should not inherit the SAVE attribute. I think that the code was doing
this, failing the following source:

```
MODULE pippo
SAVE

CONTAINS
PURE FUNCTION fft_stick_index( )
   IMPLICIT NONE
   INTEGER :: fft_stick_index
   INTEGER :: mc  !error: A pure subprogram may not have a variable with the SAVE attribute
END FUNCTION

END MODULE
```

Differential Revision: https://reviews.llvm.org/D88279
2020-09-26 12:42:14 -07:00
..
Common [flang] Use the Flang cmake-functions to add targets. 2020-04-16 15:51:30 +01:00
Decimal Remove unneeded RoundDefault enumerator, and fix spelling in comments 2020-08-03 16:14:24 -07:00
Evaluate [flang] SAVE statement should not apply to nested scoping units 2020-09-26 12:42:14 -07:00
Frontend [flang][driver] Add missing dependency in CMake files 2020-09-24 09:32:16 +01:00
FrontendTool [flang][driver] Add missing dependency in CMake files 2020-09-24 09:32:16 +01:00
Lower [flang][OpenMP] Place the insertion point to the start of the block 2020-09-25 23:56:41 +05:30
Optimizer Make namespace handling uniform across dialect backends. 2020-09-14 20:33:31 +00:00
Parser [flang][msvc] Add explicit function template argument to applyLamda. NFC. 2020-09-22 14:22:08 -05:00
Semantics [flang][msvc] Explicitly reference "this" inside closure. NFC. 2020-09-22 14:22:08 -05:00
CMakeLists.txt [flang][driver] Add the new flang compiler and frontend drivers 2020-09-11 10:55:54 +01:00