]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix deprecate warning with parameter
authorTobias Burnus <tobias@codesourcery.com>
Wed, 6 Oct 2021 06:47:40 +0000 (08:47 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 6 Oct 2021 10:09:54 +0000 (12:09 +0200)
commit7d7630fb6636530d5154d68a777b1d7d7086cfe3
tree783123ff5a9aaff9c608a4ca59f0762c3ce19718
parent15ed2b2b029ee2abd0d0eff33a2539af682c89fb
Fortran: Fix deprecate warning with parameter

Only warn with !GCC$ ATTRIBUTES DEPRECATED if
deprecated PARMETERS are actually used.

gcc/fortran/ChangeLog:

* resolve.c (resolve_values): Only show
deprecated warning if attr.referenced.

gcc/testsuite/ChangeLog:

* gfortran.dg/attr_deprecated-2.f90: New test.

(cherry picked from commit ece8b0fce6bbfb1e531de8164da47eeed80d3cf1)
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/attr_deprecated-2.f90 [new file with mode: 0644]