1! { dg-do compile } 2! PR51791 and original testcase for PR46328. 3! 4! Contributer by Thomas Koenig <tkoenig@gcc.gnu.org> 5! 6module field_module 7 implicit none 8 type ,abstract :: field 9 contains 10 procedure(field_op_real) ,deferred :: multiply_real 11 generic :: operator(*) => multiply_real 12 end type 13 abstract interface 14 function field_op_real(lhs,rhs) 15 import :: field 16 class(field) ,intent(in) :: lhs 17 real ,intent(in) :: rhs 18 class(field) ,allocatable :: field_op_real 19 end function 20 end interface 21end module 22 23program main 24 use field_module 25 implicit none 26 class(field) ,pointer :: u 27 u = (u)*2. ! { dg-error "check that there is a matching specific" } 28end program 29