Add a testcase for PR tree-optimization/63778
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 10 Nov 2014 18:08:00 +0000 (18:08 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 10 Nov 2014 18:08:00 +0000 (10:08 -0800)
PR tree-optimization/63778
* gfortran.dg/pr63778.f: New test.

From-SVN: r217304

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr63778.f [new file with mode: 0644]

index ece3d52259b294b603b83e2243f17e8e9453cc1b..4c1466959628c507f35a7e3fee4da602e9350228 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR tree-optimization/63778
+       * gfortran.dg/pr63778.f: New test.
+
 2014-11-10  Renlin Li  <renlin.li@arm.com>
 
        PR middle-end/61529
diff --git a/gcc/testsuite/gfortran.dg/pr63778.f b/gcc/testsuite/gfortran.dg/pr63778.f
new file mode 100644 (file)
index 0000000..11ce151
--- /dev/null
@@ -0,0 +1,46 @@
+! { dg-do compile }
+! { dg-options "-O3 -ffast-math" }
+
+      SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      IF( M.LT.0 ) THEN
+      END IF
+         CALL ZLARF( 'LEFT', M-N+II, II-1, A( 1, II ), 1, TAU( I ), A,
+     $               LDA, WORK )
+         CALL ZSCAL( M-N+II-1, -TAU( I ), A( 1, II ), 1 )
+         A( M-N+II, II ) = ONE - TAU( I )
+      END
+      SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
+      CHARACTER         SIDE(*)
+      LOGICAL            LSAME
+      COMPLEX*16         C( LDC, * ), V(*), WORK(*), TAU
+      IF( LSAME( SIDE, 'L' ) ) THEN
+         IF( TAU.NE.ZERO ) THEN
+            CALL ZGEMV( 'CONJUGATE TRANSPOSE', M, N, ONE, C, LDC, V,
+     $                  INCV, ZERO, WORK, 1 )
+         END IF
+      END IF
+      END
+      LOGICAL          FUNCTION LSAME( CA, CB )
+      CHARACTER         CA(*), CB(*)
+      END
+      SUBROUTINE ZGEMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX,
+     $                   BETA, Y, INCY )
+      COMPLEX*16         A( LDA, * ), X( * ), Y( * )
+      CHARACTER         TRANS(*)
+      LOGICAL            LSAME
+      IF( LSAME( TRANS, 'N' ) )THEN
+         IF( INCY.EQ.1 )THEN
+               IF( X( JX ).NE.ZERO )THEN
+                     Y( I ) = Y( I ) + TEMP*A( I, J )
+               END IF
+         END IF
+      END IF
+      END
+      SUBROUTINE  ZSCAL(N,ZA,ZX,INCX)
+      COMPLEX*16 ZA,ZX(1)
+      IF( N.LE.0 .OR. INCX.LE.0 )RETURN
+   20 DO 30 I = 1,N
+        ZX(I) = ZA*ZX(I)
+   30 CONTINUE
+      END