[Patch, committed] Fortran: Fix line-truncation warning for !$acc and !gcc$ [PR97390] (was: Fortran line lengths)

Tobias Burnus tobias@codesourcery.com
Wed Oct 14 13:59:34 GMT 2020


On 10/14/20 2:02 PM, Tobias Burnus wrote:
> On 10/14/20 1:21 PM, Thomas Koenig wrote:
>> It would probably be more helpful if
>> -Werror=line-trunction worked for OpenMP statements
>> as well.

Found the reason why it didn't work with OpenACC (but does with OpenMP).

The problem is that pbuf(i) is not yet set when the check is done (i.e.
it is '\0').
Solution: test 'c' as done for OpenMP.

Committed as obvious. Thanks for the reminder that
-Werror=line-truncation (enabled by default) should have reported this.

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: committed.diff
Type: text/x-patch
Size: 2843 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20201014/47f88188/attachment.bin>


More information about the Fortran mailing list