annotate gcc/testsuite/gfortran.dg/parameter_array_ref_2.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! Test the fix for the problems in PR41044
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! Contributed by <ros@rzg.mpg.de>
kono
parents:
diff changeset
5 ! Reduced by Joos VandeVondele <jv244@cam.ac.uk>
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7 Subroutine PS_INIT (bkgd, punit, pform, psize, rot90, bbox, clip, eps, &
kono
parents:
diff changeset
8 caller)
kono
parents:
diff changeset
9 type psfd ! paper size and frame defaults
kono
parents:
diff changeset
10 character(3) :: n
kono
parents:
diff changeset
11 real :: p(2)
kono
parents:
diff changeset
12 real :: f(4)
kono
parents:
diff changeset
13 end type psfd
kono
parents:
diff changeset
14 character(4) :: fn, orich, pfmt
kono
parents:
diff changeset
15 type(psfd), parameter :: pfd(0:11)=(/ &
kono
parents:
diff changeset
16 psfd(' ',(/ 0.0, 0.0/),(/200.,120.,800.,560./)), & ! A0_L
kono
parents:
diff changeset
17 psfd('A0 ',(/ 840.9,1189.2/),(/140., 84.,560.,400./)), & ! A0_P
kono
parents:
diff changeset
18 psfd('A1 ',(/ 594.6, 840.9/),(/100., 60.,400.,280./)), & ! A1_P
kono
parents:
diff changeset
19 psfd('A2 ',(/ 420.4, 594.6/),(/ 70., 42.,280.,200./)), & ! A2_P
kono
parents:
diff changeset
20 psfd('A3 ',(/ 297.3, 420.4/),(/ 50., 30.,200.,140./)), & ! A3_P
kono
parents:
diff changeset
21 psfd('A4 ',(/ 210.2, 297.3/),(/ 35., 21.,140.,100./)), & ! A4_P
kono
parents:
diff changeset
22 psfd('A5 ',(/ 148.7, 210.2/),(/ 25., 15.,100., 70./)), & ! A5_P
kono
parents:
diff changeset
23 psfd('A6 ',(/ 105.1, 148.7/),(/ 18., 11., 70., 50./)), & ! A6_P
kono
parents:
diff changeset
24 psfd(' ',(/ 0.0, 0.0/),(/ 50., 30.,200.,140./)), & ! Letter_L
kono
parents:
diff changeset
25 psfd('LET',(/ 215.9, 279.4/),(/ 35., 21.,140.,100./)), & ! Letter_P
kono
parents:
diff changeset
26 psfd(' ',(/ 0.0, 0.0/),(/ 50., 30.,200.,140./)), & ! Legal_L
kono
parents:
diff changeset
27 psfd('LEG',(/ 215.9, 355.6/),(/ 35., 21.,140.,100./))/) ! Legal_P
kono
parents:
diff changeset
28 if (len_trim(pfmt) > 0) then ! set paper format
kono
parents:
diff changeset
29 idx=sum(maxloc(index(pfd%n,pfmt(1:3))))-1
kono
parents:
diff changeset
30 end if
kono
parents:
diff changeset
31 end subroutine PS_INIT
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 ! This, additional problem, was posted as comment #8 by Tobias Burnus <burnus@gcc.gnu.org>
kono
parents:
diff changeset
34 type t
kono
parents:
diff changeset
35 integer :: i
kono
parents:
diff changeset
36 end type t
kono
parents:
diff changeset
37 type(t), parameter :: a(1) = t(4) ! [t(4)] worked OK
kono
parents:
diff changeset
38 real(a(1)%i) :: b
kono
parents:
diff changeset
39 end