Skip to content

Commit d056747

Browse files
committed
Because of something unclear, give a bit more warnings
1 parent 947180e commit d056747

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

flang/test/Semantics/pass-global-variables.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ subroutine module_test(n)
9797

9898
!WARNING: Passing global variable 'i1' from MODULE 'explicit_test_mod' as function argument [-Wpass-global-variable]
9999
call imp_pass_int(i1) !< warn: i1 from common
100+
!WARNING: Passing global variable 'i2' from MODULE 'explicit_test_mod' as function argument [-Wpass-global-variable]
100101
call imp_pass_int(i2(1)) !< ok: single element/begin of mem block
102+
!WARNING: Passing global variable 'i2' from MODULE 'explicit_test_mod' as function argument [-Wpass-global-variable]
101103
call imp_pass_int(i2(n)) !< ok: single element/begin of mem block
102104
!WARNING: Passing global variable 'i3' from MODULE 'explicit_test_mod' as function argument [-Wpass-global-variable]
103105
call imp_pass_int(i3(1)) !< warn: shape /= [1]
@@ -108,6 +110,7 @@ subroutine module_test(n)
108110

109111
!WARNING: Passing global variable 'i2' from MODULE 'explicit_test_mod' as function argument [-Wpass-global-variable]
110112
call imp_pass_int_1d(i2) !< warn: i2 from module
113+
!WARNING: Passing global variable 'i2' from MODULE 'explicit_test_mod' as function argument [-Wpass-global-variable]
111114
call imp_pass_int_1d(i2(n:n+3)) !< ok: mem block
112115
!WARNING: Passing global variable 'i3' from MODULE 'explicit_test_mod' as function argument [-Wpass-global-variable]
113116
call imp_pass_int_1d(i3) !< warn: i3 from module & shape /= [1]

0 commit comments

Comments
 (0)