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/pr43796.f90 | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr43796.f90 (limited to 'gcc/testsuite/gfortran.dg/pr43796.f90') diff --git a/gcc/testsuite/gfortran.dg/pr43796.f90 b/gcc/testsuite/gfortran.dg/pr43796.f90 new file mode 100644 index 000000000..2e98d7ca8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr43796.f90 @@ -0,0 +1,51 @@ +! { dg-do compile } +! { dg-options "-O2 -fcheck=bounds" } + + FUNCTION F06FKFN(N,W,INCW,X,INCX) + IMPLICIT NONE + INTEGER, PARAMETER :: WP = KIND(0.0D0) + REAL (KIND=WP) :: F06FKFN + REAL (KIND=WP), PARAMETER :: ONE = 1.0E+0_WP + REAL (KIND=WP), PARAMETER :: ZERO = 0.0E+0_WP + INTEGER, INTENT (IN) :: INCW, INCX, N + REAL (KIND=WP), INTENT (IN) :: W(*), X(*) + REAL (KIND=WP) :: ABSYI, NORM, SCALE, SSQ + INTEGER :: I, IW, IX + REAL (KIND=WP), EXTERNAL :: F06BMFN + INTRINSIC ABS, SQRT + IF (N<1) THEN + NORM = ZERO + ELSE IF (N==1) THEN + NORM = SQRT(W(1))*ABS(X(1)) + ELSE + IF (INCW>0) THEN + IW = 1 + ELSE + IW = 1 - (N-1)*INCW + END IF + IF (INCX>0) THEN + IX = 1 + ELSE + IX = 1 - (N-1)*INCX + END IF + SCALE = ZERO + SSQ = ONE + DO I = 1, N + IF ((W(IW)/=ZERO) .AND. (X(IX)/=ZERO)) THEN + ABSYI = SQRT(W(IW))*ABS(X(IX)) + IF (SCALE