https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85544

--- Comment #10 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Thomas Koenig from comment #8)
>       * trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
>       (2|4|8|16) ** integer and (-1) ** integer.

Handling positive powers of 2 should be straightforward:

The condition is sth. like

  if (v > 1 && (v & (v-1) == 0))

and the exponent is derived by bit-counting the number of ones in (v-1)...

Reply via email to