llvm-project/flang/test
Peter Steinfeld 868187df21 [flang] Handle type-bound procedures with alternate returns
If you specify a type-bound procedure with an alternate return, there
will be no symbol associated with that dummy argument.  In such cases,
the compiler's list of dummy arguments will contain a nullptr.  In our
analysis of the PASS arguments of type-bound procedures, we were
assuming that all dummy arguments had non-null symbols associated with
them and were using that assumption to get the name of the dummy
argument.  This caused the compiler to try to dereference a nullptr.

I fixed this by explicitly checking for a nullptr and, in such cases, emitting
an error message.  I also added tests that contain type-bound procedures with
alternate returns in both legal and illegal constructs to ensure that semantic
analysis is working for them.

Differential Revision: https://reviews.llvm.org/D98430
2021-03-11 10:20:34 -08:00
..
Driver [flang][driver] Add -fdebug-module-writer option 2021-03-11 08:04:37 -05:00
Evaluate [flang][f18] Make -fdebug-dump-{symbols|parse-tree} imply -fsyntax-only 2021-02-16 09:22:32 +00:00
Fir [flang][fir] Add FIR Types parser diagnostic tests + cleanup 2021-03-05 14:58:44 -05:00
Frontend [flang][test] Share all driver test dirs between `f18` and `flang-new` 2021-02-23 18:21:32 +00:00
Lower [flang][driver] Revert RUN-line change 2021-03-10 16:58:24 +00:00
NonGtestUnit [flang] Run non-gtest unit tests with lit. 2020-07-24 14:49:39 +01:00
Parser [flang][driver] Add options for unparsing 2021-02-16 09:32:51 +00:00
Preprocessing [flang][driver] Update PP tests to use the new driver 2021-01-25 12:32:23 +00:00
Semantics [flang] Handle type-bound procedures with alternate returns 2021-03-11 10:20:34 -08:00
Unit [flang] unit test support for out-of-tree and in-tree using google tests framework 2020-06-15 22:09:56 +05:30
CMakeLists.txt [flang][fir] Add fir-opt tool 2021-02-16 11:48:40 -05:00
lit.cfg.py [flang][test] Share all driver test dirs between `f18` and `flang-new` 2021-02-23 18:21:32 +00:00
lit.site.cfg.py.in [flang][driver] Add the new flang compiler and frontend drivers 2020-09-11 10:55:54 +01:00