[Bug target/54988] New: fpmath=sse target pragma causes inlining failure because of target specific option mismatch

gcc at blino dot org gcc-bugzilla@gcc.gnu.org
Fri Oct 19 15:36:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54988

             Bug #: 54988
           Summary: fpmath=sse target pragma causes inlining failure
                    because of target specific option mismatch
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@blino.org
                CC: loic.yhuel@gmail.com, thiago@kde.org


#pragma GCC target "fpmath=sse"

static inline __attribute__((always_inline)) int a(int x) { return x; }

int b(int src)
{
    return a(src);
}

$ gcc -O1 ./qdrawhelper_test.cpp -c
./qdrawhelper_test.cpp: In function 'int b(int)':
./qdrawhelper_test.cpp:3:50: error: inlining failed in call to always_inline
'int a(int)': target specific option mismatch
./qdrawhelper_test.cpp:7:17: error: called from here

I have the patch from bug 33763 applied in this gcc 4.7.2 build, if that
matters.

This bug initially happened when building Qt5 with gcc -m32 on a x86_64 host
(gcc being configured without any --with-arch_32 option), in
qt5/qtbase/src/gui/painting/qdrawhelper.cpp:
In file included from
../../include/QtGui/5.0.0/QtGui/private/qdrawhelper_p.h:1:0,
                 from
/home/sah0146/dev/workspaces/pc32/stb/opensource/LGPL/qt/vendor/qt.gitorious.org/MAIN/qt5/qtbase/src/gui/painting/qdrawhelper.cpp:54:
../../include/QtGui/5.0.0/QtGui/private/../../../../../../../qt5/qtbase/src/gui/painting/qdrawhelper_p.h:
In function 'int multiply_op(int, int, int, int)':
../../include/QtGui/5.0.0/QtGui/private/../../../../../../../qt5/qtbase/src/gui/painting/qdrawhelper_p.h:797:30:
error: inlining failed in call to always_inline 'int qt_div_255(int)': target
specific option mismatch
/home/sah0146/dev/workspaces/pc32/stb/opensource/LGPL/qt/vendor/qt.gitorious.org/MAIN/qt5/qtbase/src/gui/painting/qdrawhelper.cpp:2498:70:
error: called from here

Bug 41201 might be related, even if it mentions C++ only.



More information about the Gcc-bugs mailing list