llvm-project/flang/test
Pete Steinfeld 4d8c00c059 [flang] Fix crash on erroneous expressions
Summary:
If you create an expression with parse errors, the `parser::Expr.typedExpr`
will be empty, which causes a compiler crash.  The crash is caused by the
check in check-do-forall.cpp that scans all expresssions to see if `DO`
variables are being modified.

It turned out that the problem was that I was fetching subexpressions of type
`parser::Expr`, which are not guaranteed to have a non-null `typedExpr`.  I
fixed this by only grabbing the top-level expression from which to gather
arguments as part of the DO loop analysis.  This, in turn, exposed a problem
where I wasn't collecting all of the actual arguments in an expression.  This
was caused by the fact that I wasn't recursing through the rest of the
expression after finding an argument.  I fixed this by recursing through the
argument in the member function in `CollectActualArgumentsHelper`.

Reviewers: klausler, tskeith, DavidTruby

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81101
2020-06-05 08:46:43 -07:00
..
Driver [flang] Port all remaining regression tests to lit 2020-03-13 11:58:11 +00:00
Evaluate [flang][NFC] Simplify semantics test scripts 2020-05-11 11:49:25 -07:00
Fir [flang] Upstream recent work on FIR to llvm-project. 2020-04-27 17:48:57 -07:00
Lower [flang] Implemented 2 Semantic checks for DATA statement and fixed a few bugs 2020-06-03 10:33:26 +05:30
Preprocessing [flang] Added CMakeLists changes, moved config and made test scripts compatible. 2020-03-13 13:54:24 +00:00
Semantics [flang] Fix crash on erroneous expressions 2020-06-05 08:46:43 -07:00
CMakeLists.txt [flang][NFC] Simplify semantics test scripts 2020-05-11 11:49:25 -07:00
lit.cfg.py [flang][NFC] Simplify semantics test scripts 2020-05-11 11:49:25 -07:00
lit.site.cfg.py.in [flang] Fix bug in tests for standalone build 2020-05-05 11:08:23 -07:00