]> git.ipfire.org Git - thirdparty/gcc.git/commit
lto/91299 - weak definition inlined with LTO
authorRichard Biener <rguenther@suse.de>
Fri, 28 Feb 2025 13:09:29 +0000 (14:09 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 28 Feb 2025 14:18:07 +0000 (15:18 +0100)
commitbc34db5b12e008f6ec4fdf4ebd22263c8617e5e3
treef4256f176d2480349e2b885e4e22cfaee4169227
parente6037af6d5e5a43c437257580d75bc8b35a6dcfd
lto/91299 - weak definition inlined with LTO

The following fixes a thinko in the handling of interposed weak
definitions which confused the interposition check in
get_availability by setting DECL_EXTERNAL too early.

PR lto/91299
gcc/lto/
* lto-symtab.cc (lto_symtab_merge_symbols): Set DECL_EXTERNAL
only after calling get_availability.

gcc/testsuite/
* gcc.dg/lto/pr91299_0.c: New testcase.
* gcc.dg/lto/pr91299_1.c: Likewise.
gcc/lto/lto-symtab.cc
gcc/testsuite/gcc.dg/lto/pr91299_0.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/lto/pr91299_1.c [new file with mode: 0644]