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