From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D72E3385AC11; Thu, 25 Aug 2022 13:22:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D72E3385AC11 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661433753; bh=Zd0IOzkz7DZBnievUhRg0G8ahI7PkhXTQtBsFib3jos=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kvA0nDD4ReYXhEl3U7x92PRv/jhrhNEFIcjh1MW+WKZ1Aj0hQh2Iv7WX7O28c3O22 lo1zT1vRg2kMQbtT6GssOYZEqh9jy0vDRhhENVvy731dSwdlDg7bb2eMuX0m/p7Tz3 3w/OsU8gZ9aWQeZ2z/rM18W0tylSK9ec9ljdzP8A= From: "sen2403 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/91299] LTO inlines a weak definition in presence of a non-weak definition from an ELF file Date: Thu, 25 Aug 2022 13:22:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 8.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sen2403 at hotmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91299 --- Comment #13 from Eason Lai --- The inline rule in ipa-inline.c::inline_small_functions can be bypassed by adding "noinline" attribute as shown below. __attribute__((weak, noinline)) int get_t(void) { return 0; } It's an alternative solution for me.=