public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/10965] New: g77 compiles illegal code in testsuite
@ 2003-05-24 11:44 billingd@gcc.gnu.org
  2003-05-24 14:04 ` [Bug fortran/10965] " billingd@gcc.gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: billingd@gcc.gnu.org @ 2003-05-24 11:44 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: g77 compiles illegal code in testsuite
           Product: gcc
           Version: 3.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: billingd@gcc.gnu.org
        ReportedBy: billingd@gcc.gnu.org
                CC: gcc-bugs@gcc.gnu.org

Steve Kargl reported a problem with 20000601-2.f.  The test is one of mine. I 
will check over my notes and come up with a fix.

I'm running the Fortran 77 code in gcc-testsuite-3.3.tar.bz2
through g95 and I've found that 20000601-2.f contains
illegal code for Fortran 95 and probably Fortran 77.  I don't
have the Fortran 77 standard handy, but I believe the code is
illegal; yet g77 compiles the code without warning or error. 

kargl[303] f77 -v -c 20000601-2.f
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.2.2 [FreeBSD] 20030205 (release)

kargl[305] f95 -V -fixed -dusty 20000601-2.f
NAGWare Fortran 95 compiler Release 4.2(468)
Copyright 1990-2002 The Numerical Algorithms Group Ltd., Oxford, U.K.
f95comp version is 4.2(468)
Warning: 20000601-2.f, line 27: Unused symbol WORK31
         detected at END@<end-of-statement>
Warning: 20000601-2.f, line 27: Unused symbol WORK13
         detected at END@<end-of-statement>
[f95 continuing despite warning messages]
Obsolescent: 20000601-2.f, line 1: Fixed source form
Error: 20000601-2.f, line 21: Inconsistent argument data types to intrinsic MAX

kargl[318] ../../../../bin/g95 -ffixed-form -c -x f95 20000601-2.f
 In file 20000601-2.f:21

            JP = MAX( KM+1, AB( KV+1, JJ ) )
                          1
Error: 'a2' argument of 'max' intrinsic at (1) must be INTEGER(4)

-- 
Steve
http://troutmask.apl.washington.edu/~kargl/



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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/10965] g77 compiles illegal code in testsuite
  2003-05-24 11:44 [Bug fortran/10965] New: g77 compiles illegal code in testsuite billingd@gcc.gnu.org
@ 2003-05-24 14:04 ` billingd@gcc.gnu.org
  2003-05-27  0:36 ` david.billinghurst@riotinto.com
  2003-06-03  0:15 ` billingd@gcc.gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: billingd@gcc.gnu.org @ 2003-05-24 14:04 UTC (permalink / raw)
  To: gcc-bugs

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


billingd@gcc.gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
   Last reconfirmed|0000-00-00 00:00:00         |2003-05-24 11:07:08
               date|                            |





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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/10965] g77 compiles illegal code in testsuite
  2003-05-24 11:44 [Bug fortran/10965] New: g77 compiles illegal code in testsuite billingd@gcc.gnu.org
  2003-05-24 14:04 ` [Bug fortran/10965] " billingd@gcc.gnu.org
@ 2003-05-27  0:36 ` david.billinghurst@riotinto.com
  2003-06-03  0:15 ` billingd@gcc.gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: david.billinghurst@riotinto.com @ 2003-05-27  0:36 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/10965] g77 compiles illegal code in testsuite
  2003-05-24 11:44 [Bug fortran/10965] New: g77 compiles illegal code in testsuite billingd@gcc.gnu.org
  2003-05-24 14:04 ` [Bug fortran/10965] " billingd@gcc.gnu.org
  2003-05-27  0:36 ` david.billinghurst@riotinto.com
@ 2003-06-03  0:15 ` billingd@gcc.gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: billingd@gcc.gnu.org @ 2003-06-03  0:15 UTC (permalink / raw)
  To: gcc-bugs

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


billingd@gcc.gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From billingd@gcc.gnu.org  2003-06-03 00:15 -------
Fixed in 3.4 by http://gcc.gnu.org/ml/gcc-patches/2003-05/msg02225.html

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).  The test case was reduced from LAPACK so we will notice if the 
problem comes back.

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

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





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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-03  0:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-24 11:44 [Bug fortran/10965] New: g77 compiles illegal code in testsuite billingd@gcc.gnu.org
2003-05-24 14:04 ` [Bug fortran/10965] " billingd@gcc.gnu.org
2003-05-27  0:36 ` david.billinghurst@riotinto.com
2003-06-03  0:15 ` billingd@gcc.gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).