2 ! { dg-options "-fdec" }
4 ! Test the usage of TYPE as an alias for PRINT.
6 ! Note the heavy use of other TYPE statements to test for
7 ! regressions involving ambiguity.
12 integer i
/0/, j
/1/, k
/2/
13 character(*), parameter :: fmtstr
= "(A11)"
14 namelist /nmlist
/ i
, j
, k
15 integer, parameter :: n
= 5
18 ! derived type declarations
27 type, extends(point
) :: point_3d
31 type, extends(point
) :: color_point
35 ! declaration type specification
37 type(point
), target
:: p
38 type(point_3d
), target
:: p3
39 type(color_point
), target
:: c
40 class(point
), pointer :: p_or_c
44 select
type ( a
=> p_or_c
)
46 print *, "point" ! <===
51 ! Type as alias for print
56 type 10, 'Integer literal'
57 type 10, 'Integer variable'
58 type '(A11)', 'Character literal'
59 type fmtstr
, 'Character variable'
60 type nmlist
! namelist
79 a(i
) = 2 * (a(i
-1) + 1)
80 if (b
) type*,a(i
) ! test TYPE as PRINT inside one-line IF