arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / transfer_array_intrinsic_5.f90
blobc886b03f66559f67cfeeed85e53bfc14da5cdc12
1 ! { dg-do compile }
2 ! PR35680 - used to ICE because the argument of SIZE, being in a restricted
3 ! expression, was not checked if it too is restricted or is a variable. Since
4 ! it is neither, an error should be produced.
6 ! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8 program main
9 print *, foo (), bar (), foobar ()
10 contains
11 function foo ()
12 integer foo(size (transfer (x, [1]))) ! { dg-error "cannot appear" }
13 real x
14 end function
15 function bar()
16 real x
17 integer bar(size (transfer (x, [1]))) ! { dg-error "cannot appear" }
18 end function
19 function foobar() ! { dg-error "no IMPLICIT" }
20 implicit none
21 integer foobar(size (transfer (x, [1]))) ! { dg-error "used before" }
22 real x
23 end function
24 end program