Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

__builtin_choose_expr internal error

salas__daniel
Beginner
587 Views

I have the following internal error when I try to use the C11 __builtin_choose_expr with a compound literal as follow: 

internal error: assertion failed at: "shared/cfe/edgcpfe/expr.c", line 259
  union utype {__typeof__(__builtin_choose_expr (0, (short) {0}, (double) {0})) u00_m;};


Another internal error arise when I use a block form :

internal error: bad pointer
  union utype {__typeof__(__builtin_choose_expr (0, ({short p00_val = {0}; p00_val;}),  ({double p00_val = {0}; p00_val;}))) u01_m;};

Do you have any work around to make this work ?

Thank you

0 Kudos
2 Replies
TimP
Honored Contributor III
587 Views
This forum may not bring attention to the issue. If it is ignored on c++ forum you may need a full ips problem report. The construct appears to be needed for compatibility with gcc 4.7 and newer so ought to work with icc 7.0.1.
0 Kudos
salas__daniel
Beginner
587 Views

Thank you Tim for your answer. I've find a way to pass through the problem.
Here is the Jens Gustedt's method :

union utype {__typeof__(__builtin_choose_expr (0, *(short*)0, *(double*)0)) u00_m;};

With this casting form the compiler doesn't complain anymore !
 

0 Kudos
Reply