This is a partial backport of commit 8e3a0eb1 at p2
icc: fix for intel compiler icc