Hello,
Contrary to gcc and icc 11.1, I encounter wrong source line number indication for instructions in some loops.
I can reproduce the problem if I compile the following function (alone in a C file) using the latest version of icc (12.1.0) with flags "-g -S -fno-inline-functions":
void foo (int n, double *t) {
int i;
for (i=0; i t = 1.0;
}
Instructions corresponding to t = 1.0 are labeled as source line 1 instead of 5.
Other strange facts:
* the loop is unrolled (-g implies -O0 and I don't think loop unrolling should occur at O0...)
* removing -fno-inline-functions or replacing "double *t" with "double t
* removing -fno-inline-functions prevents icc from unrolling
What do you think ?
Thank you in advance
Link Copied
For more complete information about compiler optimizations, see our Optimization Notice.