* [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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ messages in thread