Query resolution for a member ... that has a nonclass type

I wanted to know why the following code compiles in Visual Studio, but gives a compilation error in Mingw GCC during porting. This is my first time I contact the type __m128, but from this link it says here

You should not access the __m128 fields directly. You can, however, see these types in the debugger. A variable of type __m128 maps to the XMM[0-7] registers.

The code base is very old, and this type is used as

Matrix m;
__m128  b0 = _mm_set_ps(b[0][0], b[1][0], b[2][0], 0);
__m128  b1 = _mm_set_ps(b[0][2], b[1][3], b[2][4], 0);

__m128  a00 = _mm_load1_ps(&a[0][0]);
__m128  a10 = _mm_load1_ps(&a[1][0]);
__m128  r1a = _mm_mul_ps(a00, b0);
__m128  r1b = _mm_mul_ps(a10, b1);
__m128  r1 = _mm_add_ps(r1a, r1b);

m[0][0] = r1.m128_f32[3];

The error I get is

 error: request for member 'm128_f32' in 'r1', which is of non-class type '__m128 {aka __vector(4) float}'
  m[0][0] = r1.m128_f32[3];

I tried to find this error here and here , however, I believe that they are not relevant to my case because they concerned the most unpleasant problem of C ++ parsing. Any suggestions on how I can solve this problem would be appreciated. Thank.

+4
1

GCC VS, . __m128, . . , , . [], .

+1

All Articles