[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: =?UTF-8?B?W0J1ZyBpcGEvMTAxMjcwXSBOZXc6IGVycm9yOiBpbmxpbmluZyBm?= =?UTF-8?B?YWlsZWQgaW4gY2FsbCB0byDig
From: "marxin at gcc dot gnu.org via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date: 2021-06-30 13:53:21
Message-ID: bug-101270-4 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101270
Bug ID: 101270
Summary: error: inlining failed in call to ‘always_inline'
‘open.localalias': function not inlinable 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 = open("/proc/mounts", 00);
return mounts_fd;
}
$ gcc large_mounts.i -c -O2 -fPIC -fno-semantic-interposition
large_mounts.i: In function ‘open':
large_mounts.i:6:5: error: inlining failed in call to ‘always_inline'
‘open.localalias': function not inlinable
6 | int open(const char *path, int flags, ...) {
| ^~~~
large_mounts.i:8:15: note: called from here
8 | mounts_fd = 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 ‘open':
large_mounts.i:6:5: error: inlining failed in call to ‘always_inline'
‘open.localalias': redefined extern inline functions are not considered for
inlining
6 | int open(const char *path, int flags, ...) {
| ^~~~
large_mounts.i:8:15: note: called from here
8 | mounts_fd = open("/proc/mounts", 00);
| ^~~~~~~~~~~~~~~~~~~~~~~~
this one is rejected since r8-2126-g325fe81618c822b8.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic