PR c++/80916 - spurious "static but not defined" warning.
authorJason Merrill <jason@redhat.com>
Thu, 7 Mar 2019 15:10:22 +0000 (10:10 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 7 Mar 2019 15:10:22 +0000 (10:10 -0500)
commitd4babd373b9634c6964cad53423470ac8f38addf
tree6af919ee11170b35a1dd5ac2f872e4eaeba7038d
parent5161ffa4f5ae6133167673afc607c07e0be787f8
PR c++/80916 - spurious "static but not defined" warning.

Nothing can refer to an internal decl with no definition, so we shouldn't
treat such a decl as a possible devirtualization target.

* gimple-fold.c (can_refer_decl_in_current_unit_p): Return false
for an internal symbol with DECL_EXTERNAL.

From-SVN: r269459
gcc/ChangeLog
gcc/gimple-fold.c
gcc/testsuite/g++.dg/warn/unused-fn1.C [new file with mode: 0644]