arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pdt_28.f03
blobde687913c763967eccbb7be53379b209ade06c93
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
4 ! Test the fix for PR83731, where the following failed on the check for the
5 ! value of the parameter 'k'.
7 ! Contributed by Berke Durak  <berke.durak@gmail.com>
9 module pdt_m
10   implicit none
11   type :: vec(k)
12      integer, len :: k=10
13      integer :: foo(k)
14   end type vec
15 contains
16   function total(a)
17     type(vec(k=*)), intent(in) :: a ! Would compare with the default initializer.
18     integer :: total
19     
20     total=sum(a%foo)
21   end function total
22 end module pdt_m
24 program test_pdt
25   use pdt_m
26   implicit none
27   type(vec(k=123)) :: u
29   u%foo=1
30   if (total(u) .ne. u%k) STOP 1
31 end program test_pdt