File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ namespace Fortran::semantics {
31
31
// - 1-element arrays being single member of COMMON
32
32
// - avy variable from module except
33
33
// - having attribute PARAMETER or PRIVATE
34
+ // - having DERIVED type
34
35
// - being arrays having 1-D rank and is not having ALLOCATABLE or POINTER or
35
36
// VOLATILE attributes
36
37
static void CheckPassGlobalVariable (
@@ -74,6 +75,10 @@ static void CheckPassGlobalVariable(
74
75
if (actualFirstSymbol->attrs ().test (Attr::PARAMETER) ||
75
76
actualFirstSymbol->attrs ().test (Attr::PRIVATE)) {
76
77
warn |= false ;
78
+ } else if (auto type{characteristics::TypeAndShape::Characterize (
79
+ actualFirstSymbol, foldingContext)};
80
+ type->type ().category () == TypeCategory::Derived) {
81
+ warn |= false ;
77
82
} else if (actualFirstSymbol->Rank () != 1 ) {
78
83
warn |= true ;
79
84
} else if (!actualFirstSymbol->attrs ().test (Attr::ALLOCATABLE) &&
You can’t perform that action at this time.
0 commit comments