Bug 29559 - spurious warnings issued by g77
Summary: spurious warnings issued by g77
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-02-26 15:54 UTC by Alfredo Ferrari
Modified: 2007-04-18 16:31 UTC (History)
0 users

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

Attachments (Terms of Use)

Description Alfredo Ferrari 2001-02-26 15:54:38 UTC
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

Richard Henderson wrote:

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

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

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

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 16:55:10 UTC
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.