Bug 29559 - spurious warnings issued by g77
spurious warnings issued by g77
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-26 10:54 EST by Alfredo Ferrari
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-26 11:55:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alfredo Ferrari 2001-02-26 10:54:38 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-3smp i686)


g77 as shipped by RH7, fisher and wolverine issues spurious warnings  about
variables in COMMONs when compiled with -Wall or -Wunused

This is a known bug (fortran/892) reported and solved on the gcc
lists a couple of months ago. Apparently the fix did not find its way into
gcc-2.96-RH since the bug is still there in fisher and wolverine.

It is annoying since it prevents using -Wall or -Wunused (quite useful
options for spotting out mistakes) unless you are willing to dig out real
warnings among thousands spurious ones. Please fix it for
the next RH release. I include below one of the e-mails
of gcc-bugs, I assume there is already a patch somewhere.

Date: Wed, 29 Nov 2000 19:53:11 +0100
From: Toon Moene <toon@moene.indiv.nluug.nl>
To: Richard Henderson <rth@redhat.com>
Cc: gcc-patches@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: fortran/892: -Wunused complains unnecessarily for COMMON block
    items

Richard Henderson wrote:

> On Sun, Nov 26, 2000 at 04:26:29PM -0000, toon@moene.indiv.nluug.nl
wrote:

> >       SUBROUTINE SUB
> >       COMMON /COM/ A
> >       END
> [...]
> > unused.f:3: warning: unused variable `a'
> 
> Fixed thus:

>         * com.c (ffecom_member_phase2_): Set TREE_USED on the debugging
decl.

Thanks - amazing how I missed this needle in the 17168 line haystack :-)

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

Reproducible: Always
Steps to Reproduce:
1.create a fortran code with a common with variables which are not all used
in one of the routines where the common is included
2.compile with -Wunused or -Wall
3.Look at the spurious warning messages about the common variables
	

Actual Results:  Variables in commons which happen to be unused in one of
the subprograms where such a common is included trigger spurious warnings

Expected Results:  No warning
Comment 1 Jakub Jelinek 2001-02-26 11:55:10 EST
Added to patch queue for gcc-2.96-77.

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