I stumbled upon a bug where icpc apparently causes a loop not to be executed. I've attached a minimal example which reproduces the behavior. I've tested with icpc 15.0.3 20150407. The bug is present with -O2 and -O3, but not -O1 nor -Os:
I can reproduce this issue with 2015 U3 compiler, but it works with 2016 initial release.
Could you please upgrade to v16.0 initial release and verify?
$ source /opt/intel/compilers_and_libraries_2016.0.109/linux/bin/compilervars.sh intel64 $ icpc temp.cpp -O3 && ./a.out max: (250, 150), min: (150, 50) $ source /opt/intel/composer_xe_2015.3.187/bin/compilervars.sh intel64 $ icpc temp.cpp -O3 && ./a.out max: (150, -1000), min: (1000, 50) $