This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54988] fpmath=sse target pragma causes inlining failure because of target specific option mismatch
- From: "thiago at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 22 Oct 2012 14:43:11 +0000
- Subject: [Bug c++/54988] fpmath=sse target pragma causes inlining failure because of target specific option mismatch
- Auto-submitted: auto-generated
- References: <bug-54988-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54988
--- Comment #3 from Thiago Macieira <thiago at kde dot org> 2012-10-22 14:43:11 UTC ---
This might be as I pointed out in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54231:
(Node "Function attributes"):
On the 386/x86_64 and PowerPC backends, the inliner will not
inline a function that has different target options than the
caller, unless the callee has a subset of the target options of
the caller. For example a function declared with `target("sse3")'
can inline a function with `target("sse2")', since `-msse3'
implies `-msse2'.
My guess was that we were forcing the inlining (via always_inline) of a
function that has different target options.
But I guess that doesn't explain why it happens only in C++ and only in
optimising mode. Does always_inline inline on -O0 too?