[PATCH] Fix PR fortran/38955 testsuite/gfortran.dg/array_constructor_24.f failure

Paul Richard Thomas paul.richard.thomas@gmail.com
Sat Jan 24 07:31:00 GMT 2009


David,

I agree with Jerry.  Many thanks for the fix.

Cheers

Paul

On Sat, Jan 24, 2009 at 3:53 AM, Jerry DeLisle <jvdelisle@verizon.net> wrote:
> David Billinghurst wrote:
>>
>> PR 38955 is the failure of testsuite/gfortran.dg/array_constructor_24.f on
>> i686-pc-cygwin at -O3.  The problem seems to be a typical ix86 excess
>> precision problem when comparing floats.
>>
>> Tested on i686-pc-cygwin.  Is this OK for 4.4.0?
>>
>> 2009-01-24  David Billinghurst (billingd@gcc.gnu.org)
>>
>>    PR fortran/38955
>>    * gfortran.dg/array_constructor_24.f: Allow tolerance when
>>  comparing floats
>>
>> --- array_constructor_24.f.orig 2009-01-24 13:14:35.828125000 +1100
>> +++ array_constructor_24.f      2009-01-24 12:43:50.203125000 +1100
>> @@ -19,7 +19,7 @@
>>       DDA1 = ATAN2 ((/(REAL(J1,KV),J1=1,10)/),
>>      $                 REAL((/(J1,J1=nf10,nf1,mf1)/), KV))   !fails
>>       DDA2 = ATAN2 (DDA, DDA(10:1:-1))
>> -      if (any (DDA1 .ne. DDA2)) call abort ()
>> +      if (any (abs(DDA1-DDA2) .gt. 1.0e-6)) call abort ()
>>       END
>>
>>       subroutine FA6077 (nf10,nf1,mf1, ida)
>>
> I think it would be OK, just fixing a test case.
>
> Jerry
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy



More information about the Gcc-patches mailing list