forked from OSchip/llvm-project
be68a6adfb
When MOLD= is an array and there is no SIZE= in a call to TRANSFER(), the size of an element of the MOLD= is used as the denominator in a division to establish the extent of the vector result. When the total storage size of the SOURCE= is known to be zero, the result is empty and no division is needed. To avoid a division by zero at runtime, we need to check for a zero-sized MOLD= element type when the storage size of SOURCE= is nonzero and there is no SIZE=. Further, in the compilation-time rewriting of calls to SHAPE(TRANSFER(...)) and SIZE(TRANSFER(...)) for constant folding and simplification purposes, we can't replace the call with an arithmetic element count expression when the storage size of SOURCE= is not known to be zero and the element size of MOLD= is not known to be nonzero at compilation time. These changes mostly affect tests using a MOLD= argument that is an assumed-length character. Differential Revision: https://reviews.llvm.org/D129680 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
call.cpp | ||
character.h | ||
characteristics.cpp | ||
check-expression.cpp | ||
common.cpp | ||
complex.cpp | ||
constant.cpp | ||
expression.cpp | ||
fold-character.cpp | ||
fold-complex.cpp | ||
fold-designator.cpp | ||
fold-implementation.h | ||
fold-integer.cpp | ||
fold-logical.cpp | ||
fold-real.cpp | ||
fold-reduction.cpp | ||
fold-reduction.h | ||
fold.cpp | ||
formatting.cpp | ||
host.cpp | ||
host.h | ||
initial-image.cpp | ||
int-power.h | ||
integer.cpp | ||
intrinsics-library.cpp | ||
intrinsics.cpp | ||
logical.cpp | ||
real.cpp | ||
shape.cpp | ||
static-data.cpp | ||
target.cpp | ||
tools.cpp | ||
type.cpp | ||
variable.cpp |