[flang][OpenACC] Fix false DEFAULT(NONE) error for named DO loop construct names (#189204)
In OpenACC semantic checking filter out symbols with MiscDetails, which include construct names, scope names, complex part designators, type parameter inquiries, etc.
This commit is contained in:
parent
5b1be75929
commit
cb017fd1b4
@ -1833,7 +1833,7 @@ void AccAttributeVisitor::Post(const parser::Name &name) {
|
||||
const Symbol &symbol{name.symbol->GetUltimate()};
|
||||
if (!symbol.owner().IsDerivedType() && !symbol.has<ProcEntityDetails>() &&
|
||||
!symbol.has<SubprogramDetails>() && !IsObjectWithVisibleDSA(symbol) &&
|
||||
!symbol.has<AssocEntityDetails>()) {
|
||||
!symbol.has<AssocEntityDetails>() && !symbol.has<MiscDetails>()) {
|
||||
if (Symbol * found{currScope().FindSymbol(name.source)}) {
|
||||
if (&symbol != found) {
|
||||
// adjust the symbol within the region
|
||||
|
||||
@ -221,4 +221,11 @@ subroutine acc_parallel_default_none
|
||||
end do
|
||||
!$acc end parallel
|
||||
!$acc end data
|
||||
|
||||
! Named DO loop construct name should not be flagged by default(none).
|
||||
!$acc parallel loop firstprivate(l) copyin(a) default(none)
|
||||
outer: do i = 1, l
|
||||
a(1,i) = 1
|
||||
end do outer
|
||||
!$acc end parallel
|
||||
end subroutine acc_parallel_default_none
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user