public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/115679] New: inlining failed in call to 'foo': function not considered for inlining
@ 2024-06-27 10:45 Changqing.Li at windriver dot com
  2024-06-27 12:32 ` [Bug tree-optimization/115679] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Changqing.Li at windriver dot com @ 2024-06-27 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115679
           Summary: inlining failed in call to 'foo': function not
                    considered for inlining
           Product: gcc
           Version: 14.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Changqing.Li at windriver dot com
  Target Milestone: ---

The issue I met is similar to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54965.

Reproduce steps:
1. wget https://cairographics.org/releases/pixman-0.43.4.tar.gz
2. Untar source
3. cd pixman-0.43.4; mkdir build; 
4. add options -Og and -save-temps in meson.build
5. meson setup ./build
6. ninja -C ./build/

gcc version: both 14.0.1 and 14.1.0 can reproduce
system type: linux (eg: fedora 40)
Success option:
 ARGS = -Ipixman/libpixman-1.so.0.43.4.p -Ipixman -I../pixman
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
-std=gnu99 -O2 -g -Wdeclaration-after-statement -fno-strict-aliasing
-fvisibility=hidden -Wundef -ftrapping-math -Wno-unused-local-typedefs
-DHAVE_CONFIG_H -fPIC -pthread

Fail option:
 ARGS = -Ipixman/libpixman-1.so.0.43.4.p -Ipixman -I../pixman
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
-std=gnu99 -O2 -g -Wdeclaration-after-statement -fno-strict-aliasing
-fvisibility=hidden -Wundef -ftrapping-math -Og -Wno-unused-local-typedefs
-DHAVE_CONFIG_H -fPIC -pthread


Difference of success/fail option:  -Og,  once -Og is used, compile will fail.

Fail message:
../pixman/pixman-combine-float.c:370:5: error: inlining failed in call to
‘always_inline’ ‘combine_soft_light_c’: function not considered for inlining
  370 |     combine_ ## name ## _c (float sa, float s, float da, float d)      
\
      |     ^~~~~~~~
../pixman/pixman-combine-float.c:655:1: note: in expansion of macro
‘MAKE_SEPARABLE_PDF_COMBINERS’
  655 | MAKE_SEPARABLE_PDF_COMBINERS (soft_light)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

See the attached *.i*

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

* [Bug tree-optimization/115679] inlining failed in call to 'foo': function not considered for inlining
  2024-06-27 10:45 [Bug tree-optimization/115679] New: inlining failed in call to 'foo': function not considered for inlining Changqing.Li at windriver dot com
@ 2024-06-27 12:32 ` rguenth at gcc dot gnu.org
  2024-06-27 13:38 ` hubicka at ucw dot cz
  2024-06-27 19:40 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-27 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
With -Og it's usually that the always-inline function is called indirectly -
that's an unsupported case.

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

* [Bug tree-optimization/115679] inlining failed in call to 'foo': function not considered for inlining
  2024-06-27 10:45 [Bug tree-optimization/115679] New: inlining failed in call to 'foo': function not considered for inlining Changqing.Li at windriver dot com
  2024-06-27 12:32 ` [Bug tree-optimization/115679] " rguenth at gcc dot gnu.org
@ 2024-06-27 13:38 ` hubicka at ucw dot cz
  2024-06-27 19:40 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hubicka at ucw dot cz @ 2024-06-27 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> ---
> With -Og it's usually that the always-inline function is called indirectly -
> that's an unsupported case.
We can probably add CIF code for functions that were called indirectly
but are no more, so this is reported better.  I will cook up patch.

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

* [Bug tree-optimization/115679] inlining failed in call to 'foo': function not considered for inlining
  2024-06-27 10:45 [Bug tree-optimization/115679] New: inlining failed in call to 'foo': function not considered for inlining Changqing.Li at windriver dot com
  2024-06-27 12:32 ` [Bug tree-optimization/115679] " rguenth at gcc dot gnu.org
  2024-06-27 13:38 ` hubicka at ucw dot cz
@ 2024-06-27 19:40 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-27 19:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-06-27
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you provide the preprocessed source?

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

end of thread, other threads:[~2024-06-27 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-27 10:45 [Bug tree-optimization/115679] New: inlining failed in call to 'foo': function not considered for inlining Changqing.Li at windriver dot com
2024-06-27 12:32 ` [Bug tree-optimization/115679] " rguenth at gcc dot gnu.org
2024-06-27 13:38 ` hubicka at ucw dot cz
2024-06-27 19:40 ` 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).