PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / use_6.f90
blob0579e830f7b87d52dc9f983008889b5cf2c544be
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
3 ! Renaming of operators
4 module z
5 interface operator(.addfive.)
6 module procedure sub2
7 end interface
8 contains
9 function sub2(x)
10 integer :: sub
11 integer,intent(in) :: x
12 sub2 = x + 5
13 end function sub2
14 end module z
16 module y
17 interface operator(.addfive.)
18 module procedure sub
19 end interface
20 contains
21 function sub(x)
22 integer :: sub
23 integer,intent(in) :: x
24 sub = x + 15
25 end function sub
26 end module y
28 module x
29 interface operator(.addfive.)
30 module procedure sub
31 end interface
32 contains
33 function sub(x)
34 integer :: sub
35 integer,intent(in) :: x
36 sub = x + 25
37 end function sub
38 end module x
40 use x, only : operator(.bar.) => operator(.addfive.) ! { dg-error "Fortran 2003: Renaming operators in USE statements" }
41 use y, operator(.my.) => operator(.addfive.) ! { dg-error "Fortran 2003: Renaming operators in USE statements" }
42 use z
43 end