https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646
Denis Vlasenko <vda.linux at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vda.linux at googlemail dot com --- Comment #3 from Denis Vlasenko <vda.linux at googlemail dot com> --- I can reproduce it with: $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC) No fancy compiler flags are necessary to thigger it. Without "-fno-omit-frame-pointer", function loses its two remaining insns, I see an empty body: .type qla2x00_get_host_fabric_name, @function qla2x00_get_host_fabric_name: .LFB4504: .cfi_startproc .cfi_endproc .LFE4504: .size qla2x00_get_host_fabric_name, .-qla2x00_get_host_fabric_name Simple "gcc -Os qla_attr.i.c -S" would do. gcc -O2 produces a normally-looking function.