https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
Bug ID: 61910 Summary: undefined computation in trans-expr.c gfc_conv_cst_int_power Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Analyzing with sanitized gfortran the following line j=i**(-huge(0_8)-1) I get the following message: ../../gcc-4.9.1/gcc/fortran/trans-expr.c:2107:48: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself" The offending line in trans-expr.c is "n = (unsigned HOST_WIDE_INT) (m < 0 ? -m : m);"