public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall
@ 2004-10-22 14:04 martin at mpa-garching dot mpg dot de
2004-10-22 14:05 ` [Bug fortran/18111] [gfortran] spurious warnings with -W -Wunused martin at mpa-garching dot mpg dot de
` (10 more replies)
0 siblings, 11 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-10-22 14:04 UTC (permalink / raw)
To: gcc-bugs
When compiling the code below, gfortran emits warnings about unused
variables which are not defined by the user:
module misc_utils
implicit none
interface toString
module procedure toString_i, toString_sp
end interface
contains
function toString_i (num)
integer, intent(in) :: num
character (len=30) :: toString_i
write(toString_i,*) num
toString_i = trim(adjustl(toString_i))
end function
function toString_sp (num)
real, intent(in) :: num
character (len=30) :: toString_sp
write(toString_sp,*) num
toString_sp = trim(adjustl(toString_sp))
end function
end module misc_utils
~/tmp>gfortran -Wunused -W -v -c misc_utils.f90
Reading specs from /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: /scratch/gcc/configure --quiet
--prefix=/afs/mpa/data/martin/ugcc --enable-languages=c++,f95
--with-gmp=/afs/mpa/data/martin/mygmp
Thread model: posix
gcc version 4.0.0 20041021 (experimental)
/afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/4.0.0/f951
misc_utils.f90 -quiet -dumpbase misc_utils.f90 -mtune=pentiumpro -auxbase
misc_utils -Wunused -W -version -o /tmp/ccSekDLb.s
GNU F95 version 4.0.0 20041021 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.0.0 20041021 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
misc_utils.f90:5: warning: unused parameter '.__result'
misc_utils.f90:5: warning: unused parameter '.__result'
Interestingly, the warnings are issued for line 5, which only contains
the interface description.
--
Summary: [gfortran] spurious warnings with -W -Wall
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin at mpa-garching dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] [gfortran] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
@ 2004-10-22 14:05 ` martin at mpa-garching dot mpg dot de
2004-10-22 14:09 ` [Bug fortran/18111] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-10-22 14:05 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Summary|[gfortran] spurious warnings|[gfortran] spurious warnings
|with -W -Wall |with -W -Wunused
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
2004-10-22 14:05 ` [Bug fortran/18111] [gfortran] spurious warnings with -W -Wunused martin at mpa-garching dot mpg dot de
@ 2004-10-22 14:09 ` pinskia at gcc dot gnu dot org
2004-10-23 19:41 ` tobi at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-22 14:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-22 14:09 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-10-22 14:09:47
date| |
Summary|[gfortran] spurious warnings|spurious warnings with -W -
|with -W -Wunused |Wunused
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
2004-10-22 14:05 ` [Bug fortran/18111] [gfortran] spurious warnings with -W -Wunused martin at mpa-garching dot mpg dot de
2004-10-22 14:09 ` [Bug fortran/18111] " pinskia at gcc dot gnu dot org
@ 2004-10-23 19:41 ` tobi at gcc dot gnu dot org
2004-10-26 11:15 ` martin at mpa-garching dot mpg dot de
` (7 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-23 19:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-10-23 19:41 -------
Patch here: http://gcc.gnu.org/ml/fortran/2004-10/msg00183.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
` (2 preceding siblings ...)
2004-10-23 19:41 ` tobi at gcc dot gnu dot org
@ 2004-10-26 11:15 ` martin at mpa-garching dot mpg dot de
2004-10-26 11:23 ` martin at mpa-garching dot mpg dot de
` (6 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-10-26 11:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From martin at mpa-garching dot mpg dot de 2004-10-26 11:15 -------
The patch indeed supresses the warnings about .__result.
But the problem appears to be more general. The following code
still generates a warning:
module linebufmod
implicit none
private
public linebuf_set
contains
subroutine linebuf_set (orig)
character(len=80), dimension(:), intent(in) :: orig
print *,orig
end subroutine linebuf_set
end module linebufmod
~/tmp>gfortran -W -Wunused -c gfbug.f90
gfbug.f90:5: warning: unused parameter '_orig'
It seems that it is issued for all array-shaped arguments of a
subroutine/function which is referenced in an interface statement or
something similar.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
` (3 preceding siblings ...)
2004-10-26 11:15 ` martin at mpa-garching dot mpg dot de
@ 2004-10-26 11:23 ` martin at mpa-garching dot mpg dot de
2004-10-26 17:32 ` tobi at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-10-26 11:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From martin at mpa-garching dot mpg dot de 2004-10-26 11:23 -------
Here is a more comprehensive example:
module foo
implicit none
contains
subroutine bar(arg1, arg2, arg3, arg4)
character(len=80), intent(in) :: arg1
character(len=80), dimension(:), intent(in) :: arg2
integer, dimension(:), intent(in) :: arg3
integer, intent(in) :: arg4
print *, arg1, arg2, arg3, arg4
end subroutine bar
end module foo
~/tmp>gfortran -W -Wunused -c -O2 gfbug.f90
gfbug.f90:6: warning: unused parameter 'arg2'
gfbug.f90:6: warning: unused parameter 'arg3'
gfbug.f90:6: warning: unused parameter '_arg1'
gfbug.f90:6: warning: unused parameter '_arg2'
Note that there is no warning for arg4.
Note also that some of the warnings are only triggered with -O2.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
` (4 preceding siblings ...)
2004-10-26 11:23 ` martin at mpa-garching dot mpg dot de
@ 2004-10-26 17:32 ` tobi at gcc dot gnu dot org
2004-11-05 8:31 ` martin at mpa-garching dot mpg dot de
` (4 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-10-26 17:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-10-26 17:32 -------
Updated patch which removes the warning for the string length parameters here:
http://gcc.gnu.org/ml/gcc-patches/2004-10/msg02210.html
I'm not yet sure why the other warnings happen.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
` (5 preceding siblings ...)
2004-10-26 17:32 ` tobi at gcc dot gnu dot org
@ 2004-11-05 8:31 ` martin at mpa-garching dot mpg dot de
2004-11-05 11:20 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
` (3 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-11-05 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From martin at mpa-garching dot mpg dot de 2004-11-05 08:31 -------
Since the patch has been approved
(http://gcc.gnu.org/ml/gcc-patches/2004-10/msg02547.html),
could someone please commit it?
Or is it better to wait for the complete fix?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
` (6 preceding siblings ...)
2004-11-05 8:31 ` martin at mpa-garching dot mpg dot de
@ 2004-11-05 11:20 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-11-05 19:52 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 27+ messages in thread
From: Tobias dot Schlueter at physik dot uni-muenchen dot de @ 2004-11-05 11:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de 2004-11-05 11:20 -------
Subject: Re: spurious warnings with -W -Wunused
martin at mpa-garching dot mpg dot de wrote:
> ------- Additional Comments From martin at mpa-garching dot mpg dot de 2004-11-05 08:31 -------
> Since the patch has been approved
> (http://gcc.gnu.org/ml/gcc-patches/2004-10/msg02547.html),
> could someone please commit it?
> Or is it better to wait for the complete fix?
>
>
I hope to get there today, I've had very little time for gfortran work recently.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
` (7 preceding siblings ...)
2004-11-05 11:20 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
@ 2004-11-05 19:52 ` cvs-commit at gcc dot gnu dot org
2004-11-05 20:03 ` tobi at gcc dot gnu dot org
2005-01-09 4:46 ` giovannibajo at libero dot it
10 siblings, 0 replies; 27+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-05 19:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-11-05 19:52 -------
Subject: Bug 18111
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2004-11-05 19:52:06
Modified files:
gcc/fortran : ChangeLog trans-decl.c
Log message:
PR fortran/18111
* trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
hidden parameters.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.248&r2=1.249
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&r1=1.47&r2=1.48
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
` (8 preceding siblings ...)
2004-11-05 19:52 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-05 20:03 ` tobi at gcc dot gnu dot org
2005-01-09 4:46 ` giovannibajo at libero dot it
10 siblings, 0 replies; 27+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-11-05 20:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-11-05 20:03 -------
The commit fixes the original issue, but not all of those mentioned in comment
#4. The remaining issues are related to arrays with descriptors.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
` (9 preceding siblings ...)
2004-11-05 20:03 ` tobi at gcc dot gnu dot org
@ 2005-01-09 4:46 ` giovannibajo at libero dot it
10 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2005-01-09 4:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2005-01-09 04:46 -------
This breaks -Werror builds.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (13 preceding siblings ...)
2006-08-21 16:59 ` martin at mpa-garching dot mpg dot de
@ 2006-08-21 20:13 ` paulthomas2 at wanadoo dot fr
14 siblings, 0 replies; 27+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2006-08-21 20:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #24 from paulthomas2 at wanadoo dot fr 2006-08-21 20:13 -------
Subject: Re: spurious warnings with -W -Wunused
martin,
>------- Comment #23 from martin at mpa-garching dot mpg dot de 2006-08-21 16:59 -------
>(In reply to comment #22)
>
>
>
>>I have a half memory that there is already a PR for this. Could you
>>check first before submitting a new one, please?
>>
>>
>
>If you are referring to PR21918, I think the current behaviour is worse than
>that, because the locations given are clearly wrong (i.e. in the wrong
>functions).
>I didn't find another PR that looks similar.
>
>
Yes, that's the one. I think that the cause must be the same, even if
the symptoms are more severe. File a PR and link it to PR21918,
please(since I will almost certainly have to deal with it, I am asking
that as a housekeeping favour!).
Best regards
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2006-08-21 13:32 ` paulthomas2 at wanadoo dot fr
@ 2006-08-21 16:59 ` martin at mpa-garching dot mpg dot de
2006-08-21 20:13 ` paulthomas2 at wanadoo dot fr
14 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2006-08-21 16:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #23 from martin at mpa-garching dot mpg dot de 2006-08-21 16:59 -------
(In reply to comment #22)
> I have a half memory that there is already a PR for this. Could you
> check first before submitting a new one, please?
If you are referring to PR21918, I think the current behaviour is worse than
that, because the locations given are clearly wrong (i.e. in the wrong
functions).
I didn't find another PR that looks similar.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2006-08-21 11:58 ` martin at mpa-garching dot mpg dot de
@ 2006-08-21 13:32 ` paulthomas2 at wanadoo dot fr
2006-08-21 16:59 ` martin at mpa-garching dot mpg dot de
2006-08-21 20:13 ` paulthomas2 at wanadoo dot fr
14 siblings, 0 replies; 27+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2006-08-21 13:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from paulthomas2 at wanadoo dot fr 2006-08-21 13:31 -------
Subject: Re: spurious warnings with -W -Wunused
martin,
>
>Should I open a new PR for this?
>
>
>
>
I have a half memory that there is already a PR for this. Could you
check first before submitting a new one, please?
Thanks
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2006-08-20 18:10 ` pault at gcc dot gnu dot org
@ 2006-08-21 11:58 ` martin at mpa-garching dot mpg dot de
2006-08-21 13:32 ` paulthomas2 at wanadoo dot fr
` (2 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2006-08-21 11:58 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]
------- Comment #21 from martin at mpa-garching dot mpg dot de 2006-08-21 11:58 -------
(In reply to comment #20)
> Fixed on trunk and 4.1
Thanks! The incorrect warnings have gone away.
However, if I provoke correct warnings now, the line numbers in the warning
messages are really confused, e.g. for the following code:
module test
contains
subroutine dmc_fill_cache (handle1)
integer, intent(inout) :: handle1
integer foo
end subroutine
subroutine dmc_check_consistency (handle2)
integer, intent(inout) :: handle2
integer bar
call assert_read(handle2)
end subroutine
end module test
martin@linux:~/tmp> gfortran -c fits_io.F90 -Wunused
fits_io.F90: In function dmc_check_consistency:
fits_io.F90:4: warning: unused variable bar
fits_io.F90: In function dmc_fill_cache:
fits_io.F90:14: warning: unused variable handle1
fits_io.F90:14: warning: unused variable foo
Should I open a new PR for this?
--
martin at mpa-garching dot mpg dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2006-08-20 8:21 ` pault at gcc dot gnu dot org
@ 2006-08-20 18:10 ` pault at gcc dot gnu dot org
2006-08-21 11:58 ` martin at mpa-garching dot mpg dot de
` (3 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-20 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from pault at gcc dot gnu dot org 2006-08-20 18:10 -------
Fixed on trunk and 4.1
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-08-20 5:47 ` pault at gcc dot gnu dot org
@ 2006-08-20 8:21 ` pault at gcc dot gnu dot org
2006-08-20 18:10 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-20 8:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from pault at gcc dot gnu dot org 2006-08-20 08:21 -------
Subject: Bug 18111
Author: pault
Date: Sun Aug 20 08:20:26 2006
New Revision: 116269
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116269
Log:
2006-08-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28601
PR fortran/28630
* gfortran.h : Eliminate gfc_dt_list structure and reference
to it in gfc_namespace.
* resolve.c (resolve_fl_derived): Remove the building of the
list of derived types for the current namespace.
* symbol.c (find_renamed_type): New function to find renamed
derived types by symbol name rather than symtree name.
(gfc_use_derived): Search parent namespace for identical
derived type and use it, even if local version is complete,
except in interface bodies. Ensure that renamed derived types
are found by call to find_renamed_type. Recurse for derived
type components.
(gfc_free_dt_list): Remove.
(gfc_free_namespace): Remove call to previous.
* trans-types.c (copy_dt_decls_ifequal): Remove.
(gfc_get_derived_type): Remove all the paraphenalia for
association of derived types, including calls to previous.
* match.c (gfc_match_allocate): Call gfc_use_derived to
associate any derived types that are being allocated.
PR fortran/20886
* resolve.c (resolve_actual_arglist): The passing of
a generic procedure name as an actual argument is an
error.
PR fortran/28735
* resolve.c (resolve_variable): Check for a symtree before
resolving references.
PR fortran/28762
* primary.c (match_variable): Return MATCH_NO if the symbol
is that of the program.
PR fortran/28425
* trans-expr.c (gfc_trans_subcomponent_assign): Translate
derived type component expressions other than another derived
type constructor.
PR fortran/28496
* expr.c (find_array_section): Correct errors in
the handling of a missing start value for the
index triplet in an array reference.
PR fortran/18111
* trans-decl.c (gfc_build_dummy_array_decl): Before resetting
reference to backend_decl, set it DECL_ARTIFICIAL.
(gfc_get_symbol_decl): Likewise for original dummy decl, when
a copy is made of an array.
(create_function_arglist): Likewise for the _entry paramter
in entry_masters.
(build_entry_thunks): Likewise for dummies in entry thunks.
PR fortran/28771
* decl.c (add_init_expr_to_sym): Remove setting of charlen for
an initializer of an assumed charlen variable.
PR fortran/28660
* trans-decl.c (generate_expr_decls): New function.
(generate_dependency_declarations): New function.
(generate_local_decl): Call previous if not either a dummy or
a declaration in an entry master.
2006-08-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28630
* gfortran.dg/used_types_2.f90: New test.
PR fortran/28601
* gfortran.dg/used_types_3.f90: New test.
PR fortran/20886
* gfortran.dg/generic_actual_arg.f90: New test.
PR fortran/28735
* gfortran.dg/module_private_array_refs_1.f90: New test.
PR fortran/28762
* gfortran.dg/program_name_1.f90: New test.
PR fortran/28425
* gfortran.dg/derived_constructor_comps_1.f90: New test.
PR fortran/28496
* gfortran.dg/array_initializer_2.f90: New test.
PR fortran/18111
* gfortran.dg/unused_artificial_dummies_1.f90: New test.
PR fortran/28771
* gfortran.dg/assumed_charlen_in_main.f90: New test.
PR fortran/28660
* gfortran.dg/dependent_decls_1.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/array_initializer_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_in_main.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/dependent_decls_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/generic_actual_arg.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/module_private_array_refs_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/program_name_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_types_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/used_types_3.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/decl.c
branches/gcc-4_1-branch/gcc/fortran/expr.c
branches/gcc-4_1-branch/gcc/fortran/gfortran.h
branches/gcc-4_1-branch/gcc/fortran/match.c
branches/gcc-4_1-branch/gcc/fortran/primary.c
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/symbol.c
branches/gcc-4_1-branch/gcc/fortran/trans-decl.c
branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
branches/gcc-4_1-branch/gcc/fortran/trans-types.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-08-18 5:15 ` patchapp at dberlin dot org
@ 2006-08-20 5:47 ` pault at gcc dot gnu dot org
2006-08-20 8:21 ` pault at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-20 5:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from pault at gcc dot gnu dot org 2006-08-20 05:46 -------
Subject: Bug 18111
Author: pault
Date: Sun Aug 20 05:45:43 2006
New Revision: 116268
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116268
Log:
2006-08-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28601
PR fortran/28630
* gfortran.h : Eliminate gfc_dt_list structure and reference
to it in gfc_namespace.
* resolve.c (resolve_fl_derived): Remove the building of the
list of derived types for the current namespace.
* symbol.c (find_renamed_type): New function to find renamed
derived types by symbol name rather than symtree name.
(gfc_use_derived): Search parent namespace for identical
derived type and use it, even if local version is complete,
except in interface bodies. Ensure that renamed derived types
are found by call to find_renamed_type. Recurse for derived
type components.
(gfc_free_dt_list): Remove.
(gfc_free_namespace): Remove call to previous.
* trans-types.c (copy_dt_decls_ifequal): Remove.
(gfc_get_derived_type): Remove all the paraphenalia for
association of derived types, including calls to previous.
* match.c (gfc_match_allocate): Call gfc_use_derived to
associate any derived types that are being allocated.
PR fortran/20886
* resolve.c (resolve_actual_arglist): The passing of
a generic procedure name as an actual argument is an
error.
PR fortran/28735
* resolve.c (resolve_variable): Check for a symtree before
resolving references.
PR fortran/28762
* primary.c (match_variable): Return MATCH_NO if the symbol
is that of the program.
PR fortran/28425
* trans-expr.c (gfc_trans_subcomponent_assign): Translate
derived type component expressions other than another derived
type constructor.
PR fortran/28496
* expr.c (find_array_section): Correct errors in
the handling of a missing start value for the
index triplet in an array reference.
PR fortran/18111
* trans-decl.c (gfc_build_dummy_array_decl): Before resetting
reference to backend_decl, set it DECL_ARTIFICIAL.
(gfc_get_symbol_decl): Likewise for original dummy decl, when
a copy is made of an array.
(create_function_arglist): Likewise for the _entry paramter
in entry_masters.
(build_entry_thunks): Likewise for dummies in entry thunks.
PR fortran/28600
* trans-decl.c (gfc_get_symbol_decl): Ensure that the
DECL_CONTEXT of the length of a character dummy is the
same as that of the symbol declaration.
PR fortran/28771
* decl.c (add_init_expr_to_sym): Remove setting of charlen for
an initializer of an assumed charlen variable.
PR fortran/28660
* trans-decl.c (generate_expr_decls): New function.
(generate_dependency_declarations): New function.
(generate_local_decl): Call previous if not either a dummy or
a declaration in an entry master.
2006-08-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28630
* gfortran.dg/used_types_2.f90: New test.
PR fortran/28601
* gfortran.dg/used_types_3.f90: New test.
PR fortran/20886
* gfortran.dg/generic_actual_arg.f90: New test.
PR fortran/28735
* gfortran.dg/module_private_array_refs_1.f90: New test.
PR fortran/28762
* gfortran.dg/program_name_1.f90: New test.
PR fortran/28425
* gfortran.dg/derived_constructor_comps_1.f90: New test.
PR fortran/28496
* gfortran.dg/array_initializer_2.f90: New test.
PR fortran/18111
* gfortran.dg/unused_artificial_dummies_1.f90: New test.
PR fortran/28600
* gfortran.dg/assumed_charlen_function_4.f90: New test.
PR fortran/28771
* gfortran.dg/assumed_charlen_in_main.f90: New test.
PR fortran/28660
* gfortran.dg/dependent_decls_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/array_initializer_2.f90
trunk/gcc/testsuite/gfortran.dg/assumed_charlen_function_4.f90
trunk/gcc/testsuite/gfortran.dg/assumed_charlen_in_main.f90
trunk/gcc/testsuite/gfortran.dg/dependent_decls_1.f90
trunk/gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f90
trunk/gcc/testsuite/gfortran.dg/generic_actual_arg.f90
trunk/gcc/testsuite/gfortran.dg/module_private_array_refs_1.f90
trunk/gcc/testsuite/gfortran.dg/program_name_1.f90
trunk/gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f90
trunk/gcc/testsuite/gfortran.dg/used_types_2.f90
trunk/gcc/testsuite/gfortran.dg/used_types_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/expr.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/match.c
trunk/gcc/fortran/primary.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/symbol.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-types.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-08-16 21:58 ` paulthomas2 at wanadoo dot fr
@ 2006-08-18 5:15 ` patchapp at dberlin dot org
2006-08-20 5:47 ` pault at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: patchapp at dberlin dot org @ 2006-08-18 5:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from patchapp at dberlin dot org 2006-08-18 05:15 -------
Subject: Bug number PR18111
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00634.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-08-16 13:04 ` jakub at gcc dot gnu dot org
@ 2006-08-16 21:58 ` paulthomas2 at wanadoo dot fr
2006-08-18 5:15 ` patchapp at dberlin dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2006-08-16 21:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from paulthomas2 at wanadoo dot fr 2006-08-16 21:58 -------
Subject: Re: spurious warnings with -W -Wunused
jakub at gcc dot gnu dot org wrote:
>------- Comment #15 from jakub at gcc dot gnu dot org 2006-08-16 13:04 -------
>It looks good to me.
>
>
>
>
Thanks, Jakub; I was wondering because it was not quite in keeping with
other cases. However, setting DECL_ARTIFICIAL there had teh advantage
that no if statements were required.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-08-16 12:54 ` pault at gcc dot gnu dot org
@ 2006-08-16 13:04 ` jakub at gcc dot gnu dot org
2006-08-16 21:58 ` paulthomas2 at wanadoo dot fr
` (8 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-08-16 13:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jakub at gcc dot gnu dot org 2006-08-16 13:04 -------
It looks good to me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-08-16 12:50 ` pault at gcc dot gnu dot org
@ 2006-08-16 12:54 ` pault at gcc dot gnu dot org
2006-08-16 13:04 ` jakub at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-16 12:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from pault at gcc dot gnu dot org 2006-08-16 12:54 -------
Created an attachment (id=12083)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12083&action=view)
Fix for the PR
Jakub,
The last part of this patch is required to stop the likes of the function f1,
in gfortran.fortran-torture/execute/entry_6.f90 from complaining that the
parameters a and b are unused. Do you think that this is the right place to do
this, or should I do it in create_function_arglist?
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-06-06 10:14 ` martin at mpa-garching dot mpg dot de
@ 2006-08-16 12:50 ` pault at gcc dot gnu dot org
2006-08-16 12:54 ` pault at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-08-16 12:50 UTC (permalink / raw)
To: gcc-bugs
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu dot org
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-09-26 00:43:49 |2006-08-16 12:49:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
2005-11-20 12:10 ` martin at mpa-garching dot mpg dot de
2006-06-06 10:11 ` martin at mpa-garching dot mpg dot de
@ 2006-06-06 10:14 ` martin at mpa-garching dot mpg dot de
2006-08-16 12:50 ` pault at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2006-06-06 10:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from martin at mpa-garching dot mpg dot de 2006-06-06 10:11 -------
(In reply to comment #12)
> Correct "uninitialized" warnings are a very desirable feature IMO
Sorry, I meant "unused" of course :(
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
2005-11-20 12:10 ` martin at mpa-garching dot mpg dot de
@ 2006-06-06 10:11 ` martin at mpa-garching dot mpg dot de
2006-06-06 10:14 ` martin at mpa-garching dot mpg dot de
` (12 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2006-06-06 10:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from martin at mpa-garching dot mpg dot de 2006-06-06 10:10 -------
This is now open since more than a year.
Is there any hope of getting it fixed for gfortran 4.2?
Correct "uninitialized" warnings are a very desirable feature IMO
and have always been a stron point in gcc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
* [Bug fortran/18111] spurious warnings with -W -Wunused
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
@ 2005-11-20 12:10 ` martin at mpa-garching dot mpg dot de
2006-06-06 10:11 ` martin at mpa-garching dot mpg dot de
` (13 subsequent siblings)
14 siblings, 0 replies; 27+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-11-20 12:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from martin at mpa-garching dot mpg dot de 2005-11-20 12:10 -------
(In reply to comment #4)
I reran the test with the current gfortran. This is what I get:
~/tmp>gfortran -Wunused -W -v -c -O2 bla.f90
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /scratch/gcc/configure --quiet
--prefix=/afs/mpa/data/martin/ugcc --enable-languages=c++,fortran
--with-gmp=/afs/mpa/data/martin/mygmp
Thread model: posix
gcc version 4.1.0 20051117 (experimental)
/afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/4.1.0/f951 bla.f90
-quiet -dumpbase bla.f90 -mtune=pentiumpro -auxbase bla -O2 -Wunused -W
-version -o /tmp/ccmnVbiY.s
GNU F95 version 4.1.0 20051117 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.1.0 20051117 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
bla.f90:6: warning: unused parameter 'arg2'
bla.f90:6: warning: unused parameter 'arg3'
as -V -Qy -o bla.o /tmp/ccmnVbiY.s
GNU assembler version 2.15 (i686-pc-linux-gnu) using BFD version 2.15
Better, but not perfect yet ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18111
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2006-08-21 20:13 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-22 14:04 [Bug fortran/18111] New: [gfortran] spurious warnings with -W -Wall martin at mpa-garching dot mpg dot de
2004-10-22 14:05 ` [Bug fortran/18111] [gfortran] spurious warnings with -W -Wunused martin at mpa-garching dot mpg dot de
2004-10-22 14:09 ` [Bug fortran/18111] " pinskia at gcc dot gnu dot org
2004-10-23 19:41 ` tobi at gcc dot gnu dot org
2004-10-26 11:15 ` martin at mpa-garching dot mpg dot de
2004-10-26 11:23 ` martin at mpa-garching dot mpg dot de
2004-10-26 17:32 ` tobi at gcc dot gnu dot org
2004-11-05 8:31 ` martin at mpa-garching dot mpg dot de
2004-11-05 11:20 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2004-11-05 19:52 ` cvs-commit at gcc dot gnu dot org
2004-11-05 20:03 ` tobi at gcc dot gnu dot org
2005-01-09 4:46 ` giovannibajo at libero dot it
[not found] <bug-18111-2736@http.gcc.gnu.org/bugzilla/>
2005-11-20 12:10 ` martin at mpa-garching dot mpg dot de
2006-06-06 10:11 ` martin at mpa-garching dot mpg dot de
2006-06-06 10:14 ` martin at mpa-garching dot mpg dot de
2006-08-16 12:50 ` pault at gcc dot gnu dot org
2006-08-16 12:54 ` pault at gcc dot gnu dot org
2006-08-16 13:04 ` jakub at gcc dot gnu dot org
2006-08-16 21:58 ` paulthomas2 at wanadoo dot fr
2006-08-18 5:15 ` patchapp at dberlin dot org
2006-08-20 5:47 ` pault at gcc dot gnu dot org
2006-08-20 8:21 ` pault at gcc dot gnu dot org
2006-08-20 18:10 ` pault at gcc dot gnu dot org
2006-08-21 11:58 ` martin at mpa-garching dot mpg dot de
2006-08-21 13:32 ` paulthomas2 at wanadoo dot fr
2006-08-21 16:59 ` martin at mpa-garching dot mpg dot de
2006-08-21 20:13 ` paulthomas2 at wanadoo dot fr
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).