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

ICE when using struct with array of vectors

nemequ
New Contributor I
1,323 Views

I'm hitting an ICE with 19.1 20200306 on Linux.  Here is a minimal reproducer (courtesy of c-reduce):

typedef float a;
struct b {
  a c __attribute__((__vector_size__(sizeof(2))));
} f;
typedef struct {
  struct b d[2];
} e;
void g() {
  e h;
  h.d[0] = f;
}

$ icc -c -o test.o test.c
test.c(10) (col. 12): internal error: 04010002_1670
 
compilation aborted for test.c (code 4)

0 Kudos
4 Replies
nemequ
New Contributor I
1,323 Views

While attempting to find a work-around for this I ran into another ICE with a slightly different error code: instead of 04010002_1670, this one triggers 0_1855.  The code is *very* similar so I doubt it's a separate issue, but here is the reproducer for that just in case:

typedef char a;
typedef struct {
  a b __attribute__((__vector_size__(sizeof(a))));
} c;
typedef struct {
  c d[2];
} e;
e f;
void g() { g(f.d[0]); }
void main() {}

Please let me know if you need any additional information.

0 Kudos
PrasanthD_intel
Moderator
1,323 Views

Hi Evan,

We have tried the code you have provided and got the same error as you reported.

We have then checked in the latest beta version of icc and found that there is no error. It seems like the bug is fixed in the newer version of icc.

Meanwhile, before trying the beta version you can use -qnextgen flag which is working.

icc -o out -qnextgen foo.c

This will compile without any error.

 

Regards

Prasanth

0 Kudos
GouthamK_Intel
Moderator
1,298 Views

Hi Evan,

 

Thanks for reporting this error.!


We are transferring this issue to the concerned team.

 

Regards

-Goutham


0 Kudos
Viet_H_Intel
Moderator
1,295 Views

This is a known issue and will be fixed in the next update.


0 Kudos
Reply