2020-05-12 02:38:53 +08:00
|
|
|
! RUN: %S/test_errors.sh %s %t %f18
|
2018-05-04 06:57:56 +08:00
|
|
|
module m1
|
|
|
|
integer :: x
|
|
|
|
integer, private :: y
|
2019-03-19 02:48:02 +08:00
|
|
|
interface operator(.foo.)
|
|
|
|
module procedure ifoo
|
|
|
|
end interface
|
|
|
|
interface operator(-)
|
|
|
|
module procedure ifoo
|
|
|
|
end interface
|
|
|
|
interface operator(.priv.)
|
|
|
|
module procedure ifoo
|
|
|
|
end interface
|
|
|
|
interface operator(*)
|
|
|
|
module procedure ifoo
|
|
|
|
end interface
|
|
|
|
private :: operator(.priv.), operator(*)
|
|
|
|
contains
|
|
|
|
integer function ifoo(x, y)
|
2019-12-03 00:55:44 +08:00
|
|
|
logical, intent(in) :: x, y
|
2019-03-19 02:48:02 +08:00
|
|
|
end
|
2018-05-04 06:57:56 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
use m1, local_x => x
|
|
|
|
!ERROR: 'y' is PRIVATE in 'm1'
|
|
|
|
use m1, local_y => y
|
|
|
|
!ERROR: 'z' not found in module 'm1'
|
|
|
|
use m1, local_z => z
|
2019-03-19 02:48:02 +08:00
|
|
|
use m1, operator(.localfoo.) => operator(.foo.)
|
2020-09-10 22:22:52 +08:00
|
|
|
!ERROR: 'OPERATOR(.bar.)' not found in module 'm1'
|
2019-03-19 02:48:02 +08:00
|
|
|
use m1, operator(.localbar.) => operator(.bar.)
|
2018-05-04 06:57:56 +08:00
|
|
|
|
|
|
|
!ERROR: 'y' is PRIVATE in 'm1'
|
|
|
|
use m1, only: y
|
2020-09-10 22:22:52 +08:00
|
|
|
!ERROR: 'OPERATOR(.priv.)' is PRIVATE in 'm1'
|
2019-03-19 02:48:02 +08:00
|
|
|
use m1, only: operator(.priv.)
|
2020-09-10 22:22:52 +08:00
|
|
|
!ERROR: 'OPERATOR(*)' is PRIVATE in 'm1'
|
2019-03-19 02:48:02 +08:00
|
|
|
use m1, only: operator(*)
|
2018-05-04 06:57:56 +08:00
|
|
|
!ERROR: 'z' not found in module 'm1'
|
|
|
|
use m1, only: z
|
|
|
|
!ERROR: 'z' not found in module 'm1'
|
|
|
|
use m1, only: my_x => z
|
2019-03-19 02:48:02 +08:00
|
|
|
use m1, only: operator(.foo.)
|
2020-09-10 22:22:52 +08:00
|
|
|
!ERROR: 'OPERATOR(.bar.)' not found in module 'm1'
|
2019-03-19 02:48:02 +08:00
|
|
|
use m1, only: operator(.bar.)
|
2019-03-20 04:38:54 +08:00
|
|
|
use m1, only: operator(-) , ifoo
|
2020-09-10 22:22:52 +08:00
|
|
|
!ERROR: 'OPERATOR(+)' not found in module 'm1'
|
2019-03-19 02:48:02 +08:00
|
|
|
use m1, only: operator(+)
|
2018-05-04 06:57:56 +08:00
|
|
|
|
|
|
|
end
|