[Bug fortran/94270] New: Bogus unused dummy argument warning/error
jellby at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 23 10:09:10 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94270
Bug ID: 94270
Summary: Bogus unused dummy argument warning/error
Product: gcc
Version: 7.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jellby at yahoo dot com
Target Milestone: ---
Apparently, passing an external procedure as an argument inside an internal
procedure triggers it:
$ cat test.f90
subroutine foo()
external bar
call meh(bar)
call foo_internal()
contains
subroutine foo_internal()
call meh(bar)
end subroutine foo_internal
end subroutine foo
$ gfortran -c test.f90 -Wall
test.f90:7:17:
call meh(bar)
1
Warning: Unused dummy argument ‘_formal_0’ at (1) [-Wunused-dummy-argument]
$ gfortran --version
GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
More information about the Gcc-bugs
mailing list