File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -613,9 +613,14 @@ void CUDAChecker::Enter(const parser::CUFKernelDoConstruct &x) {
613613 std::get<std::optional<parser::DoConstruct>>(x.t ))};
614614 const parser::Block *innerBlock{nullptr };
615615 if (DoConstructTightNesting (doConstruct, innerBlock) < depth) {
616- context_.Say (source,
617- " !$CUF KERNEL DO (%jd) must be followed by a DO construct with tightly nested outer levels of counted DO loops" _err_en_US,
618- std::intmax_t {depth});
616+ if (doConstruct && doConstruct->IsDoConcurrent ())
617+ context_.Say (source,
618+ " !$CUF KERNEL DO (%jd) must be followed by a DO CONCURRENT construct with at least %jd indices" _err_en_US,
619+ std::intmax_t {depth}, std::intmax_t {depth});
620+ else
621+ context_.Say (source,
622+ " !$CUF KERNEL DO (%jd) must be followed by a DO construct with tightly nested outer levels of counted DO loops" _err_en_US,
623+ std::intmax_t {depth});
619624 }
620625 if (innerBlock) {
621626 DeviceContextChecker<true >{context_}.Check (*innerBlock);
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ program main
133133 !$cuf kernel do <<< 1, 2 >>>
134134 do concurrent (j=1:10)
135135 end do
136- !ERROR: !$CUF KERNEL DO (2) must be followed by a DO construct with tightly nested outer levels of counted DO loops
136+ !ERROR: !$CUF KERNEL DO (2) must be followed by a DO CONCURRENT construct with at least 2 indices
137137 !$cuf kernel do(2) <<< 1, 2 >>>
138138 do concurrent (j=1:10)
139139 end do
You can’t perform that action at this time.
0 commit comments