組み込み関数を介したベクトル命令の使用に従って、このプログラムはコンパイルする必要があります。
int main(){
double v_sse __attribute__ ((vector_size (16)));
/*
* Should work: "For the convenience in C it is allowed to use a binary vector operation where one operand is a scalar."
*/
v_sse=v_sse+3.4;
/*
* Should work: "Vectors can be subscripted as if the vector were an array with the same number of elements and base type."
*/
double result=v_sse[0];
}
代わりに、両方の操作でエラーが発生し、無効なオペランド/タイプについて不平を言います。
x86-64システムでコンパイルするので、-msse2は暗黙的であり、コンパイラーは4.6.3です(4.7.0でもテストされているため、機能しません)。キャッチはどこですか?