1 ! RUN: %python %S/test_errors.py %s %flang_fc1
5 integer, kind
:: k
= kind(1)
6 integer, len
:: l
= 666
10 pure
integer function ifunc()
13 type(t1(k
=4,l
=ifunc())) x1
14 !PORTABILITY: Statement function 'sf1' should not contain an array constructor
15 sf1(n
) = sum([(j
,j
=1,n
)])
17 !PORTABILITY: Statement function 'sf2' should not contain a structure constructor
19 !PORTABILITY: Statement function 'sf3' should not contain a type parameter inquiry
21 !ERROR: Recursive call to statement function 'sf4' is not allowed
23 !ERROR: Statement function 'sf5' may not reference another statement function 'sf6' that is defined later
26 !ERROR: Statement function 'sf6' may not reference another statement function 'sf7' that is defined later
28 !PORTABILITY: Statement function 'sf7' should not reference function 'explicit' that requires an explicit interface
30 real :: a(3) = [1., 2., 3.]
31 !PORTABILITY: Statement function 'sf8' should not pass an array argument that is not a whole array
35 !ERROR: Defining expression of statement function 'sf9' cannot be converted to its result type INTEGER(4)
39 real function explicit(x
,y
)
40 integer, intent(in
) :: x
41 integer, intent(in
), optional
:: y
49 !PORTABILITY: An implicitly typed statement function should not appear when the same symbol is available in its host scope