[4.2 backport, libfortran] Fix PR 30981

Thomas Koenig Thomas.Koenig@online.de
Tue Mar 6 21:09:00 GMT 2007


Hello Mark,

this backport fixes a rather nasty bug in libgfortran, where
innocent-looking code used to cause an endless loop on execution.
It is self-contained, and should therefore be reasonably safe
for backporting.

>From the Fortran maintainer's point of view, this is OK to backport.
Is this OK for 4.2 for you at this stage?

	Thomas

2007-03-06  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/30981
	Backport from trunk.
	* m4/pow_m4: Use appropriate unsigned int type for u.
	* generated/pow_c10_i16.c: Regenerated.
	* generated/pow_c10_i4.c: Regenerated.
	* generated/pow_c10_i8.c: Regenerated.
	* generated/pow_c16_i16.c: Regenerated.
	* generated/pow_c16_i4.c: Regenerated.
	* generated/pow_c16_i8.c: Regenerated.
	* generated/pow_c4_i16.c: Regenerated.
	* generated/pow_c4_i4.c: Regenerated.
	* generated/pow_c4_i8.c: Regenerated.
	* generated/pow_c8_i16.c: Regenerated.
	* generated/pow_c8_i4.c: Regenerated.
	* generated/pow_c8_i8.c: Regenerated.
	* generated/pow_i16_i16.c: Regenerated.
	* generated/pow_i16_i4.c: Regenerated.
	* generated/pow_i16_i8.c: Regenerated.
	* generated/pow_i4_i16.c: Regenerated.
	* generated/pow_i4_i4.c: Regenerated.
	* generated/pow_i4_i8.c: Regenerated.
	* generated/pow_i8_i16.c: Regenerated.
	* generated/pow_i8_i4.c: Regenerated.
	* generated/pow_i8_i8.c: Regenerated.
	* generated/pow_r10_i16.c: Regenerated.
	* generated/pow_r10_i4.c: Regenerated.
	* generated/pow_r10_i8.c: Regenerated.
	* generated/pow_r16_i16.c: Regenerated.
	* generated/pow_r16_i4.c: Regenerated.
	* generated/pow_r16_i8.c: Regenerated.
	* generated/pow_r4_i16.c: Regenerated.
	* generated/pow_r4_i4.c: Regenerated.
	* generated/pow_r4_i8.c: Regenerated.
	* generated/pow_r8_i16.c: Regenerated.
	* generated/pow_r8_i4.c: Regenerated.
	* generated/pow_r8_i8.c: Regenerated.
	
2007-03-06  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/30981
	Backport from trunk.
	* gfortran.dg/integer_exponentiation_1.f90:  New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pow.m4.diff
Type: text/x-diff
Size: 595 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070306/fcd946e3/attachment.bin>
-------------- next part --------------
! { dg-do run }
! PR 30981 - this used to go into an endless loop during execution.
program test
  a = 3.0
  b = a**(-2147483647-1) ! { dg-warning "Integer outside symmetric range" }
end program test


More information about the Gcc-patches mailing list