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. --- gcc/testsuite/gfortran.dg/intrinsic_pack_4.f90 | 72 ++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/intrinsic_pack_4.f90 (limited to 'gcc/testsuite/gfortran.dg/intrinsic_pack_4.f90') diff --git a/gcc/testsuite/gfortran.dg/intrinsic_pack_4.f90 b/gcc/testsuite/gfortran.dg/intrinsic_pack_4.f90 new file mode 100644 index 000000000..691036817 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/intrinsic_pack_4.f90 @@ -0,0 +1,72 @@ +! { dg-do run } +! PR 35990 - some empty array sections caused pack to crash. +! Test case contributed by Dick Hendrickson, adjusted and +! extended by Thomas Koenig. + program try_gf1048 + + call gf1048a( 10, 8, 7, 1, 0, .true.) + call gf1048b( 10, 8, 7, 1, 0, .true.) + call gf1048c( 10, 8, 7, 1, 0, .true.) + call gf1048d( 10, 8, 7, 1, 0, .true.) + call P_inta ( 10, 8, 7, 1, 0, .true.) + call P_intb ( 10, 8, 7, 1, 0, .true.) + call P_intc ( 10, 8, 7, 1, 0, .true.) + call P_intd ( 10, 8, 7, 1, 0, .true.) + end program + + SUBROUTINE GF1048a(nf10,nf8,nf7,nf1,nf0,nf_true) + logical nf_true + CHARACTER(9) BDA(10) + CHARACTER(9) BDA1(10) + BDA( 8:7) = PACK(BDA1( 10: 1), NF_TRUE) + END SUBROUTINE + + SUBROUTINE GF1048b(nf10,nf8,nf7,nf1,nf0,nf_true) + logical nf_true + CHARACTER(9) BDA(10) + CHARACTER(9) BDA1(nf10) + BDA(NF8:NF7) = PACK(BDA1(NF8:NF7), NF_TRUE) + END SUBROUTINE + + SUBROUTINE GF1048c(nf10,nf8,nf7,nf1,nf0,nf_true) + logical nf_true + CHARACTER(9) BDA(10) + CHARACTER(9) BDA1(10) + BDA(NF8:NF7) = PACK(BDA1(NF10:NF1), NF_TRUE) + END SUBROUTINE + + SUBROUTINE GF1048d(nf10,nf8,nf7,nf1,nf0,nf_true) + logical nf_true + CHARACTER(9) BDA(10) + CHARACTER(9) BDA1(nf10) + BDA(NF8:NF7) = PACK(BDA1(NF10:NF1), NF_TRUE) + END SUBROUTINE + + SUBROUTINE P_INTa(nf10,nf8,nf7,nf1,nf0,nf_true) + logical nf_true + INTEGER BDA(10) + INTEGER BDA1(10) + BDA( 8:7) = PACK(BDA1( 10: 1), NF_TRUE) + END SUBROUTINE + + SUBROUTINE P_INTb(nf10,nf8,nf7,nf1,nf0,nf_true) + logical nf_true + INTEGER BDA(10) + INTEGER BDA1(nf10) + BDA(NF8:NF7) = PACK(BDA1(NF8:NF7), NF_TRUE) + END SUBROUTINE + + SUBROUTINE P_INTc(nf10,nf8,nf7,nf1,nf0,nf_true) + logical nf_true + INTEGER BDA(10) + INTEGER BDA1(10) + BDA(NF8:NF7) = PACK(BDA1(NF10:NF1), NF_TRUE) + END SUBROUTINE + + SUBROUTINE P_INTd(nf10,nf8,nf7,nf1,nf0,nf_true) + logical nf_true + INTEGER BDA(10) + INTEGER BDA1(nf10) + BDA(NF8:NF7) = PACK(BDA1(NF10:NF1), NF_TRUE) + END SUBROUTINE + -- cgit v1.2.3