target specific option mismatch?

Matthias Kretz kretz@compeng.uni-frankfurt.de
Fri Apr 15 09:04:00 GMT 2011


Hi,

I experience a miscompile with GCC 4.6.0 (#48616) and was trying to implement 
a workaround in my library, but no success. The bug is connected to use of the 
XOP instruction set and -ftree-vectorize. So I thought I can just disable one 
or both of those in the function where the miscompile happens. But that 
function is a member of a template class and thus inlined. Apparently that 
leads to neither "#pragma GCC optimize/target" nor 
"__attribute__((optimize/target))" changing anything, or is that another bug?

Anyway this is what I got:

#define VC_WORKAROUND __attribute__((optimize("no-tree-vectorize"),target("no-
xop")))

template<> inline Vector<T> &VC_WORKAROUND VectorBase<T>::operator>>=(const 
VectorBase<T> &x)
{
    for_all_vector_entries(i,
            d.m(i) >>= x.d.m(i);
            );
    return *static_cast<Vector<T> *>(this);
}

vector.tcc:286:1: sorry, unimplemented: inlining failed in call to 
‘Vc::SSE::Vector<T>& Vc::SSE::VectorBase<T>::operator<<=(const 
Vc::SSE::VectorBase<T>&) [with T = int]’: target specific option mismatch


Any suggestions how to implement a workaround?

Cheers,
	Matthias

-- 
Dipl.-Phys. Matthias Kretz
http://compeng.uni-frankfurt.de/?mkretz

SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc



More information about the Gcc-help mailing list