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 {
3037
3037
fir::getBase (genExprValue (*Fortran::semantics::GetExpr (bounds->upper ),
3038
3038
stmtCtx))));
3039
3039
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))));
3042
3044
else // If `step` is not present, assume it is `1`.
3043
3045
steps.push_back (builder->createIntegerConstant (loc, idxTy, 1 ));
3044
3046
Original file line number Diff line number Diff line change @@ -98,3 +98,18 @@ end subroutine
98
98
99
99
! CHECK-LABEL: func.func @_QPsub2
100
100
! 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