This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 Sep 2014 10:13:17 +0000
- Subject: [Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power
- Auto-submitted: auto-generated
- References: <bug-61910-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61910
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |4.9.2
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Ok, I managed to whip up a complete testcase:
program test
integer i
integer j
j=i**(-huge(0_8)-1)
end program test
on this I see
$ ./xgcc -B./ -c x.f90
/home/polacek/src/gcc/gcc/fortran/trans-expr.c:2286:48: runtime error: negation
of -9223372036854775808 cannot be represented in type 'long int [3]'; cast to
an unsigned type to negate this value to itself
So confirmed.