From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../gfortran.dg/parameter_array_ref_2.f90 | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/parameter_array_ref_2.f90 (limited to 'gcc/testsuite/gfortran.dg/parameter_array_ref_2.f90') diff --git a/gcc/testsuite/gfortran.dg/parameter_array_ref_2.f90 b/gcc/testsuite/gfortran.dg/parameter_array_ref_2.f90 new file mode 100644 index 000000000..30f300f37 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/parameter_array_ref_2.f90 @@ -0,0 +1,39 @@ +! { dg-do compile } +! Test the fix for the problems in PR41044 +! +! Contributed by +! Reduced by Joos VandeVondele +! + Subroutine PS_INIT (bkgd, punit, pform, psize, rot90, bbox, clip, eps, & + caller) + type psfd ! paper size and frame defaults + character(3) :: n + real :: p(2) + real :: f(4) + end type psfd + character(4) :: fn, orich, pfmt + type(psfd), parameter :: pfd(0:11)=(/ & + psfd(' ',(/ 0.0, 0.0/),(/200.,120.,800.,560./)), & ! A0_L + psfd('A0 ',(/ 840.9,1189.2/),(/140., 84.,560.,400./)), & ! A0_P + psfd('A1 ',(/ 594.6, 840.9/),(/100., 60.,400.,280./)), & ! A1_P + psfd('A2 ',(/ 420.4, 594.6/),(/ 70., 42.,280.,200./)), & ! A2_P + psfd('A3 ',(/ 297.3, 420.4/),(/ 50., 30.,200.,140./)), & ! A3_P + psfd('A4 ',(/ 210.2, 297.3/),(/ 35., 21.,140.,100./)), & ! A4_P + psfd('A5 ',(/ 148.7, 210.2/),(/ 25., 15.,100., 70./)), & ! A5_P + psfd('A6 ',(/ 105.1, 148.7/),(/ 18., 11., 70., 50./)), & ! A6_P + psfd(' ',(/ 0.0, 0.0/),(/ 50., 30.,200.,140./)), & ! Letter_L + psfd('LET',(/ 215.9, 279.4/),(/ 35., 21.,140.,100./)), & ! Letter_P + psfd(' ',(/ 0.0, 0.0/),(/ 50., 30.,200.,140./)), & ! Legal_L + psfd('LEG',(/ 215.9, 355.6/),(/ 35., 21.,140.,100./))/) ! Legal_P + if (len_trim(pfmt) > 0) then ! set paper format + idx=sum(maxloc(index(pfd%n,pfmt(1:3))))-1 + end if + end subroutine PS_INIT + +! This, additional problem, was posted as comment #8 by Tobias Burnus + type t + integer :: i + end type t + type(t), parameter :: a(1) = t(4) ! [t(4)] worked OK + real(a(1)%i) :: b +end -- cgit v1.2.3