Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Vector extensions not handled correctly for >>=,

$
0
0

I noticed a small issue with icc's support for GCC vector extensions: the >>= and <<= operators seem to be broken.

Here is a quick example (or, on Compiler Explorer if you prefer):

#include <stdint.h>

typedef int32_t vec __attribute__((__vector_size__(16)));

vec se(vec a) {
#if defined(CONFUSE_ICC)
  a >>= 31;
#else
  a = a >> 31;
#endif

  return a;
}

If you define CONFUSE_ICC, that will result in something like

foo.c(7): error: expression must have integral or unscoped enum type
    a >>= 31;
    ^

compilation aborted for foo.c (code 2)
Compiler returned: 2

As you can see, the workaround is straightforward enough, I just thought I should report the bug.

TCE Level: 

TCE Open Date: 

Sunday, March 15, 2020 - 11:07

Viewing all articles
Browse latest Browse all 1175

Trending Articles



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