blob: de687913c763967eccbb7be53379b209ade06c93 [file] [log] [blame]
! { dg-do run }
! { dg-options "-fbounds-check" }
! Test the fix for PR83731, where the following failed on the check for the
! value of the parameter 'k'.
! Contributed by Berke Durak <>
module pdt_m
implicit none
type :: vec(k)
integer, len :: k=10
integer :: foo(k)
end type vec
function total(a)
type(vec(k=*)), intent(in) :: a ! Would compare with the default initializer.
integer :: total
end function total
end module pdt_m
program test_pdt
use pdt_m
implicit none
type(vec(k=123)) :: u
if (total(u) .ne. u%k) STOP 1
end program test_pdt