File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -344,6 +344,9 @@ template <bool IsCUFKernelDo> class DeviceContextChecker {
344
344
[&](const common::Indirection<parser::BackspaceStmt> &x) {
345
345
WarnOnIoStmt (source);
346
346
},
347
+ [&](const common::Indirection<parser::IfStmt> &x) {
348
+ Check (x.value ());
349
+ },
347
350
[&](const auto &x) {
348
351
if (auto msg{ActionStmtChecker<IsCUFKernelDo>::WhyNotOk (x)}) {
349
352
context_.Say (source, std::move (*msg));
@@ -369,6 +372,13 @@ template <bool IsCUFKernelDo> class DeviceContextChecker {
369
372
Check (std::get<parser::Block>(eb->t ));
370
373
}
371
374
}
375
+ void Check (const parser::IfStmt &is) {
376
+ const auto &uS{
377
+ std::get<parser::UnlabeledStatement<parser::ActionStmt>>(is.t )};
378
+ CheckUnwrappedExpr (
379
+ context_, uS.source , std::get<parser::ScalarLogicalExpr>(is.t ));
380
+ Check (uS.statement , uS.source );
381
+ }
372
382
void Check (const parser::LoopControl::Bounds &bounds) {
373
383
Check (bounds.lower );
374
384
Check (bounds.upper );
Original file line number Diff line number Diff line change @@ -30,3 +30,7 @@ logical function compare_h(a,b)
30
30
!ERROR: 'b' is not an object of derived type; it is implicitly typed
31
31
compare_h = (a%h .eq. b%h)
32
32
end
33
+
34
+ attributes(global) subroutine sub2()
35
+ if (threadIdx%x == 1) print *, "I'm number one"
36
+ end subroutine
You can’t perform that action at this time.
0 commit comments