[Bug fortran/10965] g77 compiles illegal code in testsuite

david.billinghurst@riotinto.com gcc-bugzilla@gcc.gnu.org
Tue May 27 00:36:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10965



------- Additional Comments From david.billinghurst@riotinto.com  2003-05-27 00:15 -------
Subject: [Bug fortran/10965]  illegal code in testsuite - patch for testsuite

This patch removes the non-standard code in test g77.f-torture/compile/20000601-2.f.
I have looked over my notes on this. A function call was needed to trigger the bug, and 
I used MAX().  Any other function call should be OK.

I tried to rebuild a mainline g77 from 20010118 to check this, but couldn't bootstrap.
I did build a version from 20010110, but the original and modified tests both
passed (although the bug was still present if I complied the LAPACK file sgbtrf.f).

2003-05-27  David Billinghurst (David.Billinghurst@riotinto.com)

	PR fortran/10965
	* g77.f-torture/compile/20000601-2.f: Fix non-standard code.

Index: 20000601-2.f
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g77.f-torture/compile/20000601-2.f,v
retrieving revision 1.1
diff -u -r1.1 20000601-2.f
--- 20000601-2.f        19 Jan 2001 07:59:23 -0000      1.1
+++ 20000601-2.f        26 May 2003 23:55:53 -0000
@@ -11,14 +11,14 @@
       INTEGER   KL, KU, LDAB, M
       REAL      AB( LDAB, * )
 
-      INTEGER   J, JB, JJ, JP, KV, KM
+      INTEGER   J, JB, JJ, JP, KV, KM, F
       REAL      WORK13(65,64), WORK31(65,64)
       KV = KU + KL
       DO J = 1, M
          JB = MIN( 1, M-J+1 )
          DO JJ = J, J + JB - 1
             KM = MIN( KL, M-JJ )
-            JP = MAX( KM+1, AB( KV+1, JJ ) )
+            JP = F( KM+1, AB( KV+1, JJ ) )
             CALL SSWAP( JB, AB( KV+1+JJ-J, J ), LDAB-1,
      $           AB( KV+JP+JJ-J, J ), LDAB-1 )
          END DO




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the Gcc-bugs mailing list