llvm/flang/lib
Tim Keith 759a405a43 [flang] Support writing interfaces in module files.
Write symbols for external subprogram interfaces as interface-stmts.
Those go in the decls part of the module file, as opposed to contained
subprograms which go in the contains part. See modfile06.f90.

Write symbols with GenericDetails to module files. The specific
procedures of a generic interface are always written as procedure-stmts.
If they also have specific interfaces those are written in a separate
interface-stmt. See modfile07.f90.

Fix a bug where `real, external :: f` was not written like
`real f; external f`. We have to notice the EXTERNAL attribute on the
type-declaration-stmt and convert the entity to a procedure entity.
See modfile08.f90.

Fix a bug where a use-associated symbol is referenced in a
procedure-designator. We were not resolving that correctly.

Change ModFileWriter::PutEntity to include the kind of Details when
it reports an internal error due to a kind it can't handle.
Make DetailsToString public to support that.

Change test_errors.sh to fail if the f18 command exits due to a signal.
We were missing bugs where the correct errors were written out but then
module file writing crashed (due to failure to handle generics mentioned
above). Non-zero exit status is okay because we are expecting
compilation errors.

Change test_modfile.sh to allow for the expected module file contents to
be indented so the tests are easier to read.

Original-commit: flang-compiler/f18@82a7931e51
Reviewed-on: https://github.com/flang-compiler/f18/pull/132
Tree-same-pre-rewrite: false
2018-07-19 13:28:24 -07:00
..
common [flang] Better language feature enablement and warnings. 2018-07-19 09:54:23 -07:00
evaluate [flang] Address issue#125, flang-compiler/f18#115, and improve error recovery on previous issues. 2018-07-19 09:54:21 -07:00
parser [flang] prep for merge 2018-07-19 15:42:00 -07:00
semantics [flang] Support writing interfaces in module files. 2018-07-19 13:28:24 -07:00
CMakeLists.txt [flang] Rearrange some facilities into a new lib/common. 2018-06-18 11:05:17 -07:00