From watanabe@himawari.earth.s.kobe-u.ac.jp  Mon Jul 31 12:20:41 1995
Received: from himawari.earth.s.kobe-u.ac.jp (himawari.earth.s.kobe-u.ac.jp [133.30.50.170])
          by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id MAA20233
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 31 Jul 1995 12:20:22 -0700
Received: (from watanabe@localhost) by himawari.earth.s.kobe-u.ac.jp (8.6.10+2.4W/3.3W-MX) id EAA07568; Tue, 1 Aug 1995 04:20:13 +0900
Message-Id: <199507311920.EAA07568@himawari.earth.s.kobe-u.ac.jp>
Date: Tue, 1 Aug 1995 04:20:13 +0900
From: Takeshi WATANABE <watanabe@himawari.earth.s.kobe-u.ac.jp>
Reply-To: watanabe@komadori.earth.s.kobe-u.ac.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: f77 -r8
X-Send-Pr-Version: 3.2

>Number:         644
>Category:       gnu
>Synopsis:       executable file that compiled by "f77 -r8" makes core dump.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 31 12:30:00 PDT 1995
>Closed-Date:    Fri Aug 4 19:12:03 MET DST 1995
>Last-Modified:  Fri Aug  4 19:14:33 MET DST 1995
>Originator:     Takeshi WATANABE
>Release:        FreeBSD 2.0-BUILT-19950603 i386
>Organization:
Kobe University,  Kobe,  Japan.
>Environment:
FreeBSD-2.0.5-RELEASE original.
>Description:

  Executable file that compiled by "f77 -r8" makes core dump. ("f77"
without "-r8" option makes no problem)

	% f77 -r8 test.f
	% ./a.out
	Segmentation fault (core dumped)

# "-r8" is meaningful option for "f2c" command.  "f77" calls "f2c".

In spite of this, "f77 -c -r8" makes no problem.

	% f77 -c -r8 test.f
	% f77 test.o
	% ./a.out
(This is OK.)

  I tested "f77" command with "-v" option.  It was found that "f77" command
(without "-r8") calls finally "ld" command with "-e start" option.  However,
"f77 -r8" calls "ld" command without "-e start" option.

  I think that this feature is meaningful for "f77 -r".  However, it's
maybe meaningless for "f77 -r8".
  So, the condition for "-e start" option may change from "!r*" to "!r".

>How-To-Repeat:

  Always on FreeBSD-2.0(.5)-RELEASE.  Never on FreeBSD-1.1.5.1-RELEASE.

>Fix:

*** /usr/src/gnu/usr.bin/cc/include/tm.h.orig   Mon Nov  7 06:32:11 1994
--- /usr/src/gnu/usr.bin/cc/include/tm.h        Fri Jul 28 07:25:41 1995
***************
*** 42,48 ****
  #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
  
  #define LINK_SPEC \
!   "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*} \
     %{p:-Bstatic} %{pg:-Bstatic} %{Z}"
  
  /* This goes away when the math emulator is fixed.  */
--- 42,48 ----
  #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
  
  #define LINK_SPEC \
!   "%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*} \
     %{p:-Bstatic} %{pg:-Bstatic} %{Z}"
  
  /* This goes away when the math emulator is fixed.  */

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Fri Aug 4 19:12:03 MET DST 1995 
State-Changed-Why:  
Suggested fix applied in rev 1.11 of cc/include/tm.h 

>Unformatted:
 
