PR c/81854 - weak alias of an incompatible symbol accepted
authorMartin Sebor <msebor@redhat.com>
Tue, 19 Sep 2017 14:27:32 +0000 (14:27 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Tue, 19 Sep 2017 14:27:32 +0000 (08:27 -0600)
commite32d238855968bce82a6cca4655298c42185508d
tree486f69ae49356c806e6c4933d62a89e4f35ba897
parentd14c60ad26f57ed6d32180a96cc27c7bf1d7f5b2
PR c/81854 - weak alias of an incompatible symbol accepted

gcc/ChangeLog:

PR c/81854
* cgraphunit.c (handle_alias_pairs): Reject aliases between functions
of incompatible types.

gcc/testsuite/ChangeLog:

PR c/81854
* gcc.dg/pr81854.c: New test.
* g++.dg/ext/attr-ifunc-5.C: New test.
* g++.dg/ext/attr-ifunc-1.C: Adjust.
* g++.dg/ext/attr-ifunc-2.C: Same.
* g++.dg/ext/attr-ifunc-3.C: Same.
* g++.dg/ext/attr-ifunc-4.C: Same.
* g++.old-deja/g++.abi/vtable2.C: Same.
* gcc.dg/attr-ifunc-1.c: Same.

From-SVN: r252976
gcc/ChangeLog
gcc/cgraphunit.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/attr-ifunc-1.C
gcc/testsuite/g++.dg/ext/attr-ifunc-2.C
gcc/testsuite/g++.dg/ext/attr-ifunc-3.C
gcc/testsuite/g++.dg/ext/attr-ifunc-4.C
gcc/testsuite/g++.dg/ext/attr-ifunc-5.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.abi/vtable2.C
gcc/testsuite/gcc.dg/attr-ifunc-1.c
gcc/testsuite/gcc.dg/pr81854.c [new file with mode: 0644]