llvm-project/flang/lib
Pete Steinfeld f72106e2a3 [flang] Fix an assert when RESHAPE() is called on empty strings
Summary:
When a constant array of empty strings goes through contant folding, the result
is something that contains no bytes.  If this array is passed to the intrinsic
function `RESHAPE()`, we were not handling things correctly.  I fixed this by
checking for an empty destination when calling the function `CopyFrom()` on an
array of strings.

I also added a test with a couple of different examples that trigger the
problem.

Reviewers: klausler, tskeith, DavidTruby

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84352
2020-07-22 12:21:58 -07:00
..
Common [flang] Use the Flang cmake-functions to add targets. 2020-04-16 15:51:30 +01:00
Decimal [flang] Tuning up binary->decimal conversion 2020-07-14 13:22:26 -07:00
Evaluate [flang] Fix an assert when RESHAPE() is called on empty strings 2020-07-22 12:21:58 -07:00
Lower [flang][OpenMP] Added support for lowering OpenMP taskwait construct 2020-07-17 20:01:54 +05:30
Optimizer [flang] Adopt NoRegionArguments (WhereOp) and ParentOneOf (ResultOp) traits 2020-07-16 08:35:22 -07:00
Parser [flang] Fix source line continuation in potential macro calls (bugzilla 46768) 2020-07-21 18:21:35 -07:00
Semantics [flang] Add missing link dependencies to FrontendOpenACC. 2020-07-16 14:22:18 +01:00
CMakeLists.txt [flang] A rework of the cmake build components for in and out of tree builds. 2020-03-26 18:17:04 +00:00