https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
Bug ID: 67368 Summary: Inlining failed due to no_sanitize_address and always_inline conflict Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wojciech.mula at microgen dot com Target Milestone: --- When compiling program -- bug.cpp -- #include <emmintrin.h> __attribute__((no_sanitize_address)) void foo() { __m128i z = _mm_setzero_si128(); } -- eof -- using following command $ g++ -c -fsanitize=address bug.cpp GCC reports: In file included from bug.cpp:1:0: [...]/x86_64-unknown-linux-gnu/4.9.2/include/emmintrin.h: In function ‘void foo()’: [...]/x86_64-unknown-linux-gnu/4.9.2/include/emmintrin.h:749:1: error: inlining failed in call to always_inline ‘__m128i _mm_setzero_si128()’: function attribute mismatch _mm_setzero_si128 (void) ^ bug.cpp:5:36: error: called from here __m128i z = _mm_setzero_si128(); Compiler version (built from the sources): $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=[...]/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: [...]/source/gcc-4.9.2/configure --prefix=[...] --with-local-prefix=[...] --enable-languages=c,c++ --disable-multilib Thread model: posix gcc version 4.9.2 (GCC) I've checked the sample program on https://gcc.godbolt.org/ and for versions 5.1.0 & 5.2.0 there is the same problem. However 4.9.2 from Ubuntu is not affected.