From kargl@troutmask.apl.washington.edu  Tue Mar 26 16:18:24 1996
Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.54])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id QAA13339
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Mar 1996 16:18:23 -0800 (PST)
Received: (from root@localhost) by troutmask.apl.washington.edu (8.6.12/8.6.9) id QAA07538; Tue, 26 Mar 1996 16:20:10 -0800
Message-Id: <199603270020.QAA07538@troutmask.apl.washington.edu>
Date: Tue, 26 Mar 1996 16:20:10 -0800
From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Reply-To: kargl@troutmask.apl.washington.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: f2c's -krd option in f77 (patch enclosed)
X-Send-Pr-Version: 3.2

>Number:         1101
>Category:       gnu
>Synopsis:       f2c's -krd does not work with f77 wrapper
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 26 16:20:02 PST 1996
>Closed-Date:    Wed Mar 27 08:47:06 MET 1996
>Last-Modified:  Tue Mar 26 23:50:00 PST 1996
>Originator:     Steven G. Kargl
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
>Environment:
>Description:

f77 command does not accept the -krd f2c option.

From f2c manpage:

       -kr    Use temporary values to enforce Fortran  expression
              evaluation  where K&R (first edition) parenthesiza-
              tion rules allow rearrangement.  If the  option  is
              `-krd',  use  double precision temporaries even for
              single-precision operands.



>How-To-Repeat:

%f77 -krd some_fortran_file.f

>Fix:

*** gcc.c.orig	Tue Mar 26 15:59:42 1996
--- gcc.c	Tue Mar 26 16:00:24 1996
***************
*** 720,726 ****
    {"@f2c",
     "f2c %{checksubscripts:-C} %{I2} %{onetrip} %{honorcase:-U} %{u} %{w}\
          %{ANSIC:-A} %{a} %{C++}\
!         %{c} %{E} %{ec} %{ext} %{f} %{72} %{g} %{h} %{i2} %{kr}\
          %{P} %{p} %{r} %{r8} %{s} %{w8} %{z} %{N*}\
          %i %{!pipe: -o %g.c} %{pipe:-o -}|\n",
     "cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
--- 720,726 ----
    {"@f2c",
     "f2c %{checksubscripts:-C} %{I2} %{onetrip} %{honorcase:-U} %{u} %{w}\
          %{ANSIC:-A} %{a} %{C++}\
!         %{c} %{E} %{ec} %{ext} %{f} %{72} %{g} %{h} %{i2} %{kr} %{krd}\
          %{P} %{p} %{r} %{r8} %{s} %{w8} %{z} %{N*}\
          %i %{!pipe: -o %g.c} %{pipe:-o -}|\n",
     "cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Wed Mar 27 08:47:06 MET 1996 
State-Changed-Why:  
Suggested fix applied in rev 1.6 of gcc.c. 


From: J Wunsch <j@uriah.heep.sax.de>
To: kargl@troutmask.apl.washington.edu
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: gnu/1101: f2c's -krd option in f77 (patch enclosed)
Date: Wed, 27 Mar 1996 08:40:45 +0100 (MET)

 As Steven G. Kargl wrote:
 
 > >Fix:
 > 
 > *** gcc.c.orig	Tue Mar 26 15:59:42 1996
 > --- gcc.c	Tue Mar 26 16:00:24 1996
 > ***************
 > *** 720,726 ****
 >     {"@f2c",
 >      "f2c %{checksubscripts:-C} %{I2} %{onetrip} %{honorcase:-U} %{u} %{w}\
 >           %{ANSIC:-A} %{a} %{C++}\
 > !         %{c} %{E} %{ec} %{ext} %{f} %{72} %{g} %{h} %{i2} %{kr}\
 ...
 > !         %{c} %{E} %{ec} %{ext} %{f} %{72} %{g} %{h} %{i2} %{kr} %{krd}\
 
 The only problem i've got with this kind of specs is that cc(1) now
 does also recognize -kr and -krd as valid options, even for C sources
 where it shouldn't.  However, since this was also present before your
 patch, i'll commit it this way.
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)
>Unformatted:
