[flang][cuda] Allow STOP in device context (#120625)
STOP statement is allowed in device procedure
This commit is contained in:
parent
6e7312bda6
commit
7009b06993
@ -350,6 +350,7 @@ private:
|
||||
void Check(const parser::ActionStmt &stmt, const parser::CharBlock &source) {
|
||||
common::visit(
|
||||
common::visitors{
|
||||
[&](const common::Indirection<parser::StopStmt> &) { return; },
|
||||
[&](const common::Indirection<parser::PrintStmt> &) {},
|
||||
[&](const common::Indirection<parser::WriteStmt> &x) {
|
||||
if (x.value().format) { // Formatted write to '*' or '6'
|
||||
|
||||
@ -49,6 +49,11 @@ module m
|
||||
i = threadIdx%x
|
||||
a(i) = c(10) ! ok, a is device and c is constant
|
||||
end subroutine
|
||||
|
||||
attributes(global) subroutine stoptest()
|
||||
print*,threadIdx%x
|
||||
stop ! ok
|
||||
end subroutine
|
||||
end
|
||||
|
||||
program main
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user