public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/101270] New: error: inlining failed in call to ‘always_inline’ ‘open.localalias’: function not inlinable with -fPIC -fno-semantic-interposition
@ 2021-06-30 13:53 marxin at gcc dot gnu.org
  2021-06-30 14:01 ` [Bug ipa/101270] " hubicka at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-30 13:53 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ipa/101270] error: inlining failed in call to ‘always_inline’ ‘open.localalias’: function not inlinable with -fPIC -fno-semantic-interposition
  2021-06-30 13:53 [Bug ipa/101270] New: error: inlining failed in call to ‘always_inline’ ‘open.localalias’: function not inlinable with -fPIC -fno-semantic-interposition marxin at gcc dot gnu.org
@ 2021-06-30 14:01 ` hubicka at gcc dot gnu.org
  2022-10-18  9:11 ` fabian@ritter-vogt.de
  2024-03-01 23:07 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-06-30 14:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101270

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |hubicka at gcc dot gnu.org
   Last reconfirmed|                            |2021-06-30
     Ever confirmed|0                           |1

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
mine.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ipa/101270] error: inlining failed in call to ‘always_inline’ ‘open.localalias’: function not inlinable with -fPIC -fno-semantic-interposition
  2021-06-30 13:53 [Bug ipa/101270] New: error: inlining failed in call to ‘always_inline’ ‘open.localalias’: function not inlinable with -fPIC -fno-semantic-interposition marxin at gcc dot gnu.org
  2021-06-30 14:01 ` [Bug ipa/101270] " hubicka at gcc dot gnu.org
@ 2022-10-18  9:11 ` fabian@ritter-vogt.de
  2024-03-01 23:07 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: fabian@ritter-vogt.de @ 2022-10-18  9:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101270

--- Comment #2 from Fabian Vogt <fabian@ritter-vogt.de> ---
Fails with 12.2.1 the same way.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ipa/101270] error: inlining failed in call to ‘always_inline’ ‘open.localalias’: function not inlinable with -fPIC -fno-semantic-interposition
  2021-06-30 13:53 [Bug ipa/101270] New: error: inlining failed in call to ‘always_inline’ ‘open.localalias’: function not inlinable with -fPIC -fno-semantic-interposition marxin at gcc dot gnu.org
  2021-06-30 14:01 ` [Bug ipa/101270] " hubicka at gcc dot gnu.org
  2022-10-18  9:11 ` fabian@ritter-vogt.de
@ 2024-03-01 23:07 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-01 23:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101270

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |csfore at posteo dot net

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 114199 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-01 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 13:53 [Bug ipa/101270] New: error: inlining failed in call to ‘always_inline’ ‘open.localalias’: function not inlinable with -fPIC -fno-semantic-interposition marxin at gcc dot gnu.org
2021-06-30 14:01 ` [Bug ipa/101270] " hubicka at gcc dot gnu.org
2022-10-18  9:11 ` fabian@ritter-vogt.de
2024-03-01 23:07 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).