This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/61910] undefined computation in trans-expr.c gfc_conv_cst_int_power


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]