public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52669] New: No warning in unused private variable in modules
@ 2012-03-22 15:45 arnaud02 at users dot sourceforge.net
2012-03-22 16:26 ` [Bug fortran/52669] " burnus at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: arnaud02 at users dot sourceforge.net @ 2012-03-22 15:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52669
Bug #: 52669
Summary: No warning in unused private variable in modules
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: arnaud02@users.sourceforge.net
>cat qq2.f
module mm
private
integer :: a, b, c
public :: aa1, aa2
contains
subroutine aa1
a = 1
end subroutine aa1
subroutine aa2
b = 1
end subroutine aa2
end module mm
>/usr/local/gcc/gfortran470 -Wall -c qq2.f
>/usr/local/gcc/gfortran470 --version | head -2
GNU Fortran (GCC) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
gfortran has not detected that private variable "c" is unused. Private module
variables that are not referenced within their module are unused.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/52669] No warning in unused private variable in modules
2012-03-22 15:45 [Bug fortran/52669] New: No warning in unused private variable in modules arnaud02 at users dot sourceforge.net
@ 2012-03-22 16:26 ` burnus at gcc dot gnu.org
2013-07-11 22:19 ` tkoenig at gcc dot gnu.org
2013-07-15 6:33 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-03-22 16:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52669
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
CC| |burnus at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-03-22 16:24:06 UTC ---
g95 is better in this regard:
integer :: a, b, c
1
Warning (137): Variable 'c' at (1) is never used and never set
integer :: a, b, c
1
Warning (112): Variable 'a' at (1) is set but never used
integer :: a, b, c
1
Warning (112): Variable 'b' at (1) is set but never used
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/52669] No warning in unused private variable in modules
2012-03-22 15:45 [Bug fortran/52669] New: No warning in unused private variable in modules arnaud02 at users dot sourceforge.net
2012-03-22 16:26 ` [Bug fortran/52669] " burnus at gcc dot gnu.org
@ 2013-07-11 22:19 ` tkoenig at gcc dot gnu.org
2013-07-15 6:33 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-07-11 22:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52669
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-07-11
Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc dot gnu.org
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/52669] No warning in unused private variable in modules
2012-03-22 15:45 [Bug fortran/52669] New: No warning in unused private variable in modules arnaud02 at users dot sourceforge.net
2012-03-22 16:26 ` [Bug fortran/52669] " burnus at gcc dot gnu.org
2013-07-11 22:19 ` tkoenig at gcc dot gnu.org
@ 2013-07-15 6:33 ` burnus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-07-15 6:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52669
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Author: tkoenig
Date: Sun Jul 14 19:16:56 2013
New Revision: 200950
URL: http://gcc.gnu.org/viewcvs?rev=200950&root=gcc&view=rev
Log:
2013-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
Tobias Burnus <burnus@gcc.gnu.org>
PR fortran/52669
* trans-decl.c (gfc_finish_var_decl): Move setting of
PRIVATE for a module variable if the module has a private
default or -fmodule-private is given to...
(gfc_create_module_variable): here. Optionally
warn about private module variable which is not used.
2013-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/52669
* fortran.dg/module_variable_1.f90: New test.
* fortran.dg/module_variable_2.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/module_variable_1.f90
trunk/gcc/testsuite/gfortran.dg/module_variable_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-15 6:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-22 15:45 [Bug fortran/52669] New: No warning in unused private variable in modules arnaud02 at users dot sourceforge.net
2012-03-22 16:26 ` [Bug fortran/52669] " burnus at gcc dot gnu.org
2013-07-11 22:19 ` tkoenig at gcc dot gnu.org
2013-07-15 6:33 ` burnus at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).