Bug 151013 - g77 crash with duplicate subs and -fno-globals
g77 crash with duplicate subs and -fno-globals
Status: CLOSED DUPLICATE of bug 132579
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2005-03-13 21:20 EST by Joe Krahn
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-14 03:45:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe Krahn 2005-03-13 21:20:36 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
Gecko/20050225 Firefox/1.0.1

Description of problem:
When compiling Fortran code with duplicate subroutines, g77 gives an
error for duplicate names. If compiled with -g and -fno-globals, this
becomes a warning instead, followed by a compiler internal error.

The no-globals option is useful in F77 code mainly for mixing scalar
and array arguments. Apparently, detecting multiple definitions versus
multiple calling conventions has gotten mixed up.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create 'bug.f' with this content:
      subroutine sub1()
      subroutine sub1()

2. g77 -g -c -fno-globals bug.f

Actual Results:  bug.f:1: warning:
         subroutine sub1()
bug.f:4: (continued):
         subroutine sub1()
Global name `sub1' defined at (2) already defined at (1) [info -f g77
bug.f: In subroutine `sub1':
bug.f:5: internal compiler error: in gen_subprogram_die, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.

Expected Results:  The above should have been an error.

Additional info:

-fno-globals should should allow g77 to tolerate mismatched subroutine
arguments, often needed to work around F77 inefficientcies, but
multiple subroutine definitions must always be fatal.

It would be nice to have a 'relaxed' globals check that allowed
scalar/array mismatches as long as the data type was right. (But, F77
is so archaic anyhow.)
Comment 1 Jakub Jelinek 2005-03-14 03:45:13 EST

*** This bug has been marked as a duplicate of 132579 ***

Note You need to log in before you can comment on or make changes to this bug.