From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AFF32385E828; Wed, 30 Jun 2021 13:53:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AFF32385E828 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBpcGEvMTAxMjcwXSBOZXc6IGVycm9yOiBpbmxpbmluZyBm?= =?UTF-8?B?YWlsZWQgaW4gY2FsbCB0byDigJhhbHdheXNfaW5saW5l4oCZIOKAmG9wZW4u?= =?UTF-8?B?bG9jYWxhbGlhc+KAmTogZnVuY3Rpb24gbm90IGlubGluYWJsZSB3aXRoIC1m?= =?UTF-8?B?UElDIC1mbm8tc2VtYW50aWMtaW50ZXJwb3NpdGlvbg==?= Date: Wed, 30 Jun 2021 13:53:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 13:53:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101270 Bug ID: 101270 Summary: error: inlining failed in call to =E2=80=98always_inlin= e=E2=80=99 =E2=80=98open.localalias=E2=80=99: function not inlinab= le with -fPIC -fno-semantic-interposition Product: gcc Version: 12.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: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- The following code snipped is rejected: $ cat large_mounts.i typedef struct { } __fpos_t; extern __inline __attribute__((__always_inline__)) __attribute__((__gnu_inline__)) __attribute__((__artificial__)) int open(const char *__path, int __oflag, ...) { return 0; } int open(const char *path, int flags, ...) { int mounts_fd; mounts_fd =3D open("/proc/mounts", 00); return mounts_fd; } $ gcc large_mounts.i -c -O2 -fPIC -fno-semantic-interposition=20 large_mounts.i: In function =E2=80=98open=E2=80=99: large_mounts.i:6:5: error: inlining failed in call to =E2=80=98always_inlin= e=E2=80=99 =E2=80=98open.localalias=E2=80=99: function not inlinable 6 | int open(const char *path, int flags, ...) { | ^~~~ large_mounts.i:8:15: note: called from here 8 | mounts_fd =3D open("/proc/mounts", 00); | ^~~~~~~~~~~~~~~~~~~~~~~~ while clang accepts it: $ clang large_mounts.i -c -O2 -fPIC -fno-semantic-interposition Moreover, we reject also with: gcc large_mounts.i -c -O2 -fPIC large_mounts.i: In function =E2=80=98open=E2=80=99: large_mounts.i:6:5: error: inlining failed in call to =E2=80=98always_inlin= e=E2=80=99 =E2=80=98open.localalias=E2=80=99: redefined extern inline functions are no= t considered for inlining 6 | int open(const char *path, int flags, ...) { | ^~~~ large_mounts.i:8:15: note: called from here 8 | mounts_fd =3D open("/proc/mounts", 00); | ^~~~~~~~~~~~~~~~~~~~~~~~ this one is rejected since r8-2126-g325fe81618c822b8.=