(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
pr39695_3.f90
! { dg-do compile }
!

function g()
 interface
    subroutine g()   ! { dg-error "RESULT attribute in 'g'" }
    end subroutine g
  end interface
  real g             ! { dg-error "Symbol 'g' at .1. cannot have a type" }
end function