Created attachment 47403 [details] test-case The test-case is reduced from libxcrypt package, starting from the revision I see: $ gcc -m32 -O2 -Winline -c xcrypt.i -Werror alg-yescrypt-opt.c: In function ‘blockmix_salsa8’: alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline] alg-yescrypt-opt.c:383:364: note: called from here alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline] alg-yescrypt-opt.c:382:332: note: called from here alg-yescrypt-opt.c: In function ‘blockmix_salsa8_xor’: alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline] alg-yescrypt-opt.c:408:372: note: called from here alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline] alg-yescrypt-opt.c:406:340: note: called from here alg-yescrypt-opt.c: In function ‘blockmix’: alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline] alg-yescrypt-opt.c:674:2: note: called from here alg-yescrypt-opt.c: In function ‘blockmix_xor_save’: alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline] alg-yescrypt-opt.c:784:2: note: called from here alg-yescrypt-opt.c: In function ‘blockmix_xor.constprop’: alg-yescrypt-opt.c:280:20: error: inlining failed in call to ‘salsa20’: --param max-inline-insns-single limit reached [-Werror=inline] alg-yescrypt-opt.c:733:2: note: called from here @Honza: Can you please check that it's not a regression after the revision? I need to tweak --param max-inline-insns-single to 110 to make it happy.
-Winline + -Werror is somewhat "stupid" of course.
This is intentional, we got less aggressive at inlining inline functions for -O2 (since we do not need to do all inlining we want for -O3 when we have independent set of attributes). Indeed -Winline -Werror is not the best idea - if you want that there is always_inline attribute.
Per c#2