File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -3037,8 +3037,10 @@ class FirConverter : public Fortran::lower::AbstractConverter {
30373037 fir::getBase (genExprValue (*Fortran::semantics::GetExpr (bounds->upper ),
30383038 stmtCtx))));
30393039 if (bounds->step )
3040- steps.push_back (fir::getBase (
3041- genExprValue (*Fortran::semantics::GetExpr (bounds->step ), stmtCtx)));
3040+ steps.push_back (builder->createConvert (
3041+ crtLoc, idxTy,
3042+ fir::getBase (genExprValue (
3043+ *Fortran::semantics::GetExpr (bounds->step ), stmtCtx))));
30423044 else // If `step` is not present, assume it is `1`.
30433045 steps.push_back (builder->createIntegerConstant (loc, idxTy, 1 ));
30443046
Original file line number Diff line number Diff line change @@ -98,3 +98,18 @@ end subroutine
9898
9999! CHECK-LABEL: func.func @_QPsub2
100100! CHECK: cuf.kernel
101+
102+ subroutine sub3()
103+ integer, device :: a(10), b(10)
104+ integer :: lb = 1
105+ integer :: n = 10
106+ integer :: s = 1
107+
108+ !$cuf kernel do <<< *, * >>>
109+ do i = lb, n, s
110+ a(i) = a(i) * b(i)
111+ end do
112+ end
113+
114+ ! CHECK-LABEL: func.func @_QPsub3
115+ ! CHECK: cuf.kernel
You can’t perform that action at this time.
0 commit comments