9727b06813
When a USE statement is encountered, find the scope corresponding to the module. This is now stored in the ModuleDetails of the module symbol. useModuleScope_ tracks this while processing the USE. Currently only modules defined in the same file work because we don't have module files. At the end of a USE that isn't a use-only, add all public names that were not renamed. AddUse() handles recording of a USE by creating a local symbol with UseDetails that tracks the use-symbol in the module and the location of the USE (for error messages). If an ambiguous USE is detected, the UseDetails are replaced by UseErrorDetails. This tracks the locations of all the uses so that they can be referenced in a diagnostic. Detect attempts to re-declare use-associated symbols as well as changing their attributes (except for ASYNCHRONOUS and VOLATILE). Add missing checks for access-stmt in scoping units other than modules. Add tests for the new errors. Reorganize the MessageHandler::Say() overloadings to prevent them from becoming too numerous. Original-commit: flang-compiler/f18@cc0523134c Reviewed-on: https://github.com/flang-compiler/f18/pull/79 |
||
---|---|---|
.. | ||
documentation | ||
include/flang | ||
lib | ||
test/semantics | ||
tools | ||
.clang-format | ||
.gitignore | ||
CMakeLists.txt | ||
README.md |
f18
Selection of the C/C++ compiler
F18 requires a C++17 compiler. As of today, the code was only tested with g++ 7.2.0, g++ 7.3.0 and clang 6.0.
For a proper installation, we assume that the PATH and LD_LIBRARY_PATH environment variables are properly set to use gcc, g++ and the associated libraries.
cmake will require that the environement variables CC and CXX are properly set (else it will search for use the 'cc' and 'c++' program which are likely /usr/bin/cc and /usr/bin/c++) that can be done now or while calling cmake
export CC=gcc
export CXX=g++
Installation of LLVM & CLANG 6.0
F18 depends of the LLVM & CLANG libraries even when clang is not used as C++ compiler.
If those libraries are not provided by your system then you may want to follow the build instructions at https://clang.llvm.org/get_started.html
Installation of F18
######## Choose the installation directory
F18_PREFIX=...
######## Get Flang sources in $ROOT/f18
cd $ROOT
git clone https://github.com/ThePortlandGroup/f18.git
######## And build it in a dedicated directory
######## Reminder: If LLVM & Clang where not installed in a standard
######## location then you may also have to specify it via the
######## CMAKE_MODULE_PATH or CMAKE_PREFIX_PATH variables.
mkdir $ROOT/f18-build
cd $ROOT/f18-build
CC=gcc CXX=g++ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$F18_PREFIX $ROOT/f18
make -j 4
make install