[all-commits] [llvm/llvm-project] f72106: [flang] Fix an assert when RESHAPE() is called on ...
Pete Steinfeld via All-commits
all-commits at lists.llvm.org
Wed Jul 22 12:22:33 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f72106e2a35b12ef4bb265e755a6ee33a576c768
https://github.com/llvm/llvm-project/commit/f72106e2a35b12ef4bb265e755a6ee33a576c768
Author: Pete Steinfeld <psteinfeld at nvidia.com>
Date: 2020-07-22 (Wed, 22 Jul 2020)
Changed paths:
M flang/lib/Evaluate/constant.cpp
M flang/test/Semantics/modfile25.f90
Log Message:
-----------
[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
More information about the All-commits
mailing list