view gcc/testsuite/gfortran.dg/dummy_procedure_5.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
!
! PR 50517: gfortran must detect that actual argument type is different from dummy argument type (r178939)
!
! Contributed by Vittorio Zecca <zeccav@gmail.com>

program main

  type t
    integer g
  end type

  type u
    integer g
  end type

  type(u), external :: ufunc
  call sub(ufunc)            ! { dg-error "Type mismatch in function result" }

contains

  subroutine sub(tfunc)
    type(t), external :: tfunc
  end subroutine

end program