File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ namespace Fortran::semantics {
30
30
// - any variable from common blocks except
31
31
// - 1-element arrays being single member of COMMON
32
32
// - avy variable from module except
33
- // - having attribute PARAMETER
33
+ // - having attribute PARAMETER or PRIVATE
34
34
// - being arrays having 1-D rank and is not having ALLOCATABLE or POINTER or
35
35
// VOLATILE attributes
36
36
static void CheckPassGlobalVariable (
@@ -71,7 +71,8 @@ static void CheckPassGlobalVariable(
71
71
const Scope *module {FindModuleContaining (owner)};
72
72
ownerType = " MODULE" ;
73
73
ownerName = module ->GetName ()->ToString ();
74
- if (actualFirstSymbol->attrs ().test (Attr::PARAMETER)) {
74
+ if (actualFirstSymbol->attrs ().test (Attr::PARAMETER) ||
75
+ actualFirstSymbol->attrs ().test (Attr::PRIVATE)) {
75
76
warn |= false ;
76
77
} else if (actualFirstSymbol->Rank () != 1 ) {
77
78
warn |= true ;
You can’t perform that action at this time.
0 commit comments