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) {
1545
1545
void AccAttributeVisitor::Post (const parser::Name &name) {
1546
1546
auto *symbol{name.symbol };
1547
1547
if (symbol && !dirContext_.empty () && GetContext ().withinConstruct ) {
1548
+ symbol = &symbol->GetUltimate ();
1548
1549
if (!symbol->owner ().IsDerivedType () && !symbol->has <ProcEntityDetails>() &&
1549
1550
!symbol->has <SubprogramDetails>() && !IsObjectWithDSA (*symbol)) {
1550
1551
if (Symbol * found{currScope ().FindSymbol (name.source )}) {
@@ -1553,8 +1554,7 @@ void AccAttributeVisitor::Post(const parser::Name &name) {
1553
1554
} else if (GetContext ().defaultDSA == Symbol::Flag::AccNone) {
1554
1555
// 2.5.14.
1555
1556
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,
1558
1558
symbol->name ());
1559
1559
}
1560
1560
}
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