A user running with icpx compiler magic wrapper encountered cases where UCD mesh extents were calculated incorrectly. I creaated a simple reproducer (below). In the code below, if the intermediate casts are not used, icpx with optimization at -O3 will get it wrong. The pointers will be bad. I was told adding -fno-strict-aliasing is the correct solution. But, I wanted a solution in the code itself.
A user running with
icpx
compiler magic wrapper encountered cases where UCD mesh extents were calculated incorrectly. I creaated a simple reproducer (below). In the code below, if the intermediate casts are not used,icpx
with optimization at-O3
will get it wrong. The pointers will be bad. I was told adding-fno-strict-aliasing
is the correct solution. But, I wanted a solution in the code itself.