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*

Reply via email to