File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -1545,6 +1545,7 @@ void AccAttributeVisitor::Post(const parser::AccDefaultClause &x) {
15451545void AccAttributeVisitor::Post (const parser::Name &name) {
15461546 auto *symbol{name.symbol };
15471547 if (symbol && !dirContext_.empty () && GetContext ().withinConstruct ) {
1548+ symbol = &symbol->GetUltimate ();
15481549 if (!symbol->owner ().IsDerivedType () && !symbol->has <ProcEntityDetails>() &&
15491550 !symbol->has <SubprogramDetails>() && !IsObjectWithDSA (*symbol)) {
15501551 if (Symbol * found{currScope ().FindSymbol (name.source )}) {
@@ -1553,8 +1554,7 @@ void AccAttributeVisitor::Post(const parser::Name &name) {
15531554 } else if (GetContext ().defaultDSA == Symbol::Flag::AccNone) {
15541555 // 2.5.14.
15551556 context_.Say (name.source ,
1556- " The DEFAULT(NONE) clause requires that '%s' must be listed in "
1557- " a data-mapping clause" _err_en_US,
1557+ " The DEFAULT(NONE) clause requires that '%s' must be listed in a data-mapping clause" _err_en_US,
15581558 symbol->name ());
15591559 }
15601560 }
Original file line number Diff line number Diff line change 1+ ! RUN: %python %S/../test_errors.py %s %flang -fopenacc -pedantic
2+
3+ module mm_acc_rout_function
4+ contains
5+ integer function dosomething (res )
6+ ! $acc routine seq
7+ integer :: res
8+ dosomething = res + 1
9+ end function
10+ end module
11+
12+ program main
13+ use mm_acc_rout_function
14+ implicit none
15+ integer :: res = 1
16+ ! $acc serial default(none) copy(res)
17+ res = dosomething(res)
18+ ! $acc end serial
19+ end program
20+
You can’t perform that action at this time.
0 commit comments