]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/80916 - spurious "static but not defined" warning.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Mar 2019 15:10:22 +0000 (15:10 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Mar 2019 15:10:22 +0000 (15:10 +0000)
commitb64f1f3078a953bbb4d67157c2b203ae904e248d
tree6af919ee11170b35a1dd5ac2f872e4eaeba7038d
parent5e43308b5dbb4c859dc1eb61accbd1e138e7152d
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269459 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-fold.c
gcc/testsuite/g++.dg/warn/unused-fn1.C [new file with mode: 0644]