Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

Direct-list-initialization of __m128/__m256 variable [bug, ICL 16.0]

Garipov__Ruslan
Beginner
720 Views

The following code produces error when get compiled by Intel C++ 16 on Windows:

    __m128 boo;
    __m128 foo {boo};

The compiler emits this error:

error : no suitable conversion function from "__m128" to "float" exists
              __m128 foo {boo};
                          ^

I get the same error with `__m256` type.

This violates 8.5.4 List-initialization [dcl.init.list]:

8.5.4.3.7 Otherwise, if the initializer list has a single element of type E and either T is not a reference type or
its referenced type is reference-related to E, the object or reference is initialized from that element (by
copy-initialization for copy-list-initialization, or by direct-initialization for direct-list-initialization)...

Does it relate to "ICL can't deduce variable type when a variable is declared using a placeholder type (auto) [bug since C++17]"? I mean: is it also fixed in Intel C++ 17?

 

0 Kudos
1 Solution
Kittur_G_Intel
Employee
720 Views

Hi Ruslan,
Thanks for catching this issue. This is not fixed and I've filed an issue with the developers (CQ: DPD200408653) and will keep you updated as soon as the release with the fix is out. Appreciate your patience till then.
Regards,
Kittur

View solution in original post

0 Kudos
2 Replies
Kittur_G_Intel
Employee
720 Views

Hi Ruslan,
That appears to be the case and I'll check with the product team and will confirm and update you soon. Appreciate your patience till then.
Kittur

0 Kudos
Kittur_G_Intel
Employee
721 Views

Hi Ruslan,
Thanks for catching this issue. This is not fixed and I've filed an issue with the developers (CQ: DPD200408653) and will keep you updated as soon as the release with the fix is out. Appreciate your patience till then.
Regards,
Kittur

0 Kudos
Reply