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