2018-09-30 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / actual_array_interface_1.f90
blobbc020a3468a4c6ba590f1f7213e2b918dd7e1977
1 ! { dg-do compile }
2 ! Tests the fix for PR29490, in which the creation of the
3 ! interface expression for the first argument of the call to
4 ! 'john' would cause an ICE because GFC_TYPE_ARRAY_LBOUND
5 ! was NULL.
7 ! Contributed by Philip Mason <pmason@ricardo.com>
9 !---------------------------------
10 program fred
11 !---------------------------------
12 real :: dezz(1:10)
13 real, allocatable :: jack(:)
15 allocate(jack(10)); jack = 9.
16 dezz = john(jack,1)
17 print*,'dezz = ',dezz
19 contains
20 !---------------------------------
21 function john(t,il)
22 !---------------------------------
23 real :: t(il:)
24 real :: john(1:10)
25 john = 10.
26 end function john
27 end