------- Comment #5 from dominiq at lps dot ens dot fr 2010-05-09 21:29 ------- I am not sure to understand the requested optimization. Is it only for the special value j=-1 in j**i?
Note that for this situation I hate to rely on the compiler and I use a "flipper", i.e., I replace do i=1,10 n = (-1)**(i+1) call bar(n) end do with n = -1 do i=1,10 n = -n call bar(n) end do -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39280