https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94271
Bug ID: 94271 Summary: [8/9/10 Regression] lto1: error: two or more sections for .gnu.lto_fast_clamp.default.9.564bf999b130b5e since r8-1461-g871cc215f7507cbe Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: marxin at gcc dot gnu.org Target Milestone: --- Since the revision we do not accept: $ cat 1.i int a; static inline int __attribute__((target_clones("default", "sse2", "sse3", "sse4.1", "sse4.2", "popcnt", "avx", "avx2", "avx512f", "fma4"))) fast_clamp() {} void c() { a = fast_clamp(); } $ cat 2.i int aa; static inline int __attribute__((target_clones("default", "sse2", "sse3", "sse4.1", "sse4.2", "popcnt", "avx", "avx2", "avx512f", "fma4"))) fast_clamp() {} void b() { aa = fast_clamp(); } int main() { return 0; } $ gcc 1.i 2.i -O2 -flto ... (.text+0x0): multiple definition of `fast_clamp'; /tmp/cc3Vv3xl.o (symbol from plugin):(.text+0x0): first defined here The situation is even worse since r10-6242-gc2bd2b4664be8b73f8fd58a64dec1e93871797cc: /usr/bin/ld: /tmp/ccwTYmhr.o (symbol from plugin): in function `main': (.text+0x0): multiple definition of `fast_clamp'; /tmp/ccdQcwap.o (symbol from plugin):(.text+0x0): first defined here 1.i:6:1: error: ‘fast_clamp’ has already been defined 6 | void c() { a = fast_clamp(); } | ^ 1.i:6:1: note: previously defined here lto1: fatal error: errors during merging of translation units compilation terminated. lto-wrapper: fatal error: gcc returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status