Bug 33884 - data-initialized unused variables not detected
Summary: data-initialized unused variables not detected
Status: RESOLVED DUPLICATE of bug 30438
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks: 33056
  Show dependency treegraph
 
Reported: 2007-10-24 19:26 UTC by Thomas Koenig
Modified: 2017-12-28 19:21 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-10-25 10:55:15


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2007-10-24 19:26:37 UTC
$ cat data.f 
      subroutine foo
      real a
      data a /1.3/
      end
$ gfortran -c -Wall -O3 data.f
$ g77 -c -Wall -O3 data.f
data.f: In subroutine `foo':
In file included from data.f:0:
data.f:2: warning: unused variable 'a'

I'd expect a warning, like g77.
Comment 1 Daniel Franke 2010-05-01 14:24:41 UTC
This is very close to PR30438.
Comment 2 Dominique d'Humieres 2017-12-28 19:21:44 UTC
> This is very close to PR30438.

IMO it is a duplicate.

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