[flang] Fix one corner case in reshape intrinsic
As Fortran 2018 16.9.163, the reshape is the only intrinsic which requires the shape argument to be rank-one integer array and the SIZE of it to be one constant expression. The current expression lowering converts the shape expression with slice in intrinsic into one box value with the box element type of unknown extent. However, the genReshape requires the box element type to be constant size. So, convert the box value into one with box element type of sequence of 1 x constant. This corner case is found in cam4 in SPEC 2017 https://github.com/llvm/llvm-project/issues/56140. Reviewed By: Jean Perier Differential Revision: https://reviews.llvm.org/D128597
Loading
Please sign in to comment