https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122
--- Comment #3 from Denis Vlasenko <vda.linux at googlemail dot com> --- Created attachment 35530 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35530&action=edit Preprocessed example exhibiting a bug on gcc -4.9.2 This is a preprocessed kernel/pid.c file from kernel source. When built with -O2, it wrongly deinlines hweight_long. $ gcc -O2 -c pid.preprocessed.c -o kernel.pid.o $ objdump -dr kernel.pid.o | grep -A3 hweight_long 0000000000000000 <hweight_long>: 0: e8 00 00 00 00 callq 5 <hweight_long+0x5> 1: R_X86_64_PC32 __sw_hweight64-0x4 5: c3 retq $ gcc -v 2>&1 | tail -1 gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)