(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
function_reference_1.f90
! { dg-do compile }
! PR 44960 - this was erroneusly accepted.
! Original test case by Daniel Franke.

type t
  integer :: a
end type t
type(t) :: foo
print *, foo(1)%a ! { dg-error "Unexpected junk" }
end