*ping* Re: [PATCH] PR fortran/89100 Default widths for i, f and g format specifiers in format strings
Mark Eggleston
mark.eggleston@codethink.co.uk
Mon Jun 3 11:54:00 GMT 2019
On 24/05/2019 15:29, Mark Eggleston wrote:
>
> On 24/05/2019 11:33, Jakub Jelinek wrote:
>> On Fri, May 24, 2019 at 11:28:34AM +0100, Mark Eggleston wrote:
>>>> FAIL: gfortran.dg/fmt_f_default_field_width_3.f90Â Â -OÂ Â (test for
>>>> errors, line 33)
>>>> PASS: gfortran.dg/fmt_f_default_field_width_3.f90Â Â -O (test for
>>>> excess errors)
>>>>
>>>> that is, it seems there's no error message generated for line 33.
>>>>
>>>> Christophe
>>>>
>>> There is no error for line 33 because it isn't included in the
>>> compilation
>>> because __GFC_REAL_16__ isn't defined. DejaGnu doesn't know this and
>>> the
>>> dg-warning directive for this line is still processed.
>>>
>>> I don't know enough about DejaGnu directives to determine whether this
>>> situation can be handled. Does anybody know how to deal with a line
>>> that if
>>> compiled a warning message output and if not compiled there is no
>>> output?
>>>
>>> Is the easiest solution to omit the test code where kind=16?
>> You can do (pseudo patch, untested):
>> Â #ifdef __GFC_REAL_16__
>> Â Â Â Â Â Â real_16 = 4.18
>> -Â Â Â Â write(buffer, fmt) ':',real_16,':' ! { dg-error "Positive width
>> required" }
>> +Â Â Â Â write(buffer, fmt) ':',real_16,':' ! { dg-error "Positive width
>> required" "" { target fortran_real_16 } }
>> Â #endif
>>
>> Effective target fortran_real_16 should be true whenever:
>> Â Â Â Â Â Â Â Â real(kind=16) :: x
>> Â Â Â Â Â Â Â Â x = cos (x)
>> Â Â Â Â Â Â Â Â end
>> compiles and links into an executable without diagnostics.
>>
>> Â Â Â Â Jakub
>>
> Thanks Jakub. It's taken awhile to verify this as I had to find out
> how build the compiler without support for kind=16. Please find
> attached the fix for using dg-error within #ifdef ... #endif
>
> testsuite change log
>
> Â Â Â Mark Eggleston <mark.eggleston@codethink.com>
>
> Â Â Â PR fortran/89100
> Â Â Â * gfortran.dg/fmt_f_default_field_width_3.f90: Modify dg-error to
> allow
> Â Â Â use when kind=16 is not supported.
> Â Â Â * gfortran.dg/fmt_g_default_field_width_3.f90: Modify dg-error to
> allow
> Â Â Â use when kind=16 is not supported.
>
Please can someone commit this as I do not have the privileges to do so.
Mark
--
https://www.codethink.co.uk/privacy.html
More information about the Fortran
mailing list