modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / statement_function_5.f90
blobbc5a5dba7a0f496102d31f601825b87234523e5b
1 ! { dg-do compile }
2 ! PR fortran/115039
4 ! Check that inquiry refs work with statement functions
6 ! { dg-additional-options "-std=legacy -fdump-tree-optimized" }
7 ! { dg-prune-output " Obsolescent feature" }
8 ! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "optimized" } }
10 program testit
11 implicit none
12 complex :: x
13 real :: im
14 integer :: slen
15 character(5) :: s
16 im(x) = x%im + x%re + x%kind
17 slen(s) = s%len
18 if (im((1.0,3.0) + (2.0,4.0)) /= 14.) stop 1
19 if (slen('abcdef') /= 5) stop 2
20 end program testit