[PATCH,Fortran] -- Check for overflow integer exponentation

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Jun 14 22:56:00 GMT 2019


I have had this patch in my tree since the beginning of May.  
During constant folding, gfortran would not issue an error
for overflow for integer exponentation.  Bootstrapped 
and regression tested multiple times on x86_64-*-freebsd?
OK to commit?

2019-06-15  Steven G. Kargl  <kargl@gcc.gnu.org>

	* arith.c (arith_power): Rework overflow of an integer to an integer
	exponent.

2019-06-15  Steven G. Kargl  <kargl@gcc.gnu.org>

	* gfortran.dg/integer_exponentiation_4.f90: Update test.
	* gfortran.dg/integer_exponentiation_5.F90: Ditto.
	* gfortran.dg/no_range_check_1.f90: Ditto.

-- 
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: power.diff
Type: text/x-diff
Size: 4289 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190614/8ebfec00/attachment.bin>


More information about the Gcc-patches mailing list