Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

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

$
0
0

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?

 


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>