There is no need to lower the implicit lower bounds for assumed-shape
array in lowerExplicitLowerBounds. Remove the unused code.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Did you test that on fir-dev? Since we are in the middle of upstreaming I would rather not start removing code right now.
Comment Actions
I also checked fir-dev. Actually, this is the incorrect code. Fortran 2018 section 8.5.8.3 point 3 is for assumed-shape array, then spec->lbound().isColon() should be true. If spec->lbound().isColon() is false, the array would be assumed-size array, and this function will get early return since box.lboundIsAllOnes() is true. That's why this code is never used.
If this patch affects the progress of upstreaming, we can wait for it.
Comment Actions
OK. Got the rules. Submitted (https://github.com/flang-compiler/f18-llvm-project/pull/1545) in fir-dev.
Comment Actions
Thanks @clementval and @jeanPerier . I will land this after the one in fir-dev is mereged.