On Sun, 10 Feb 2013, bodrato at mail.dm.unipi.it wrote: > I do not know if current gcc can optimise a loop like: > for (int i = 3; (i < 1 << 30) && mpz_gt_ui_p (z, i); i <<= 1) ; > but we give it the chance to. You should use i*=2 instead of i<<=1 to maximize optimization opportunities. And then gcc does optimize this. -- Marc Glisse