scanner.c
63.8 KB
-
[Fortran] Truncate warn with OpenMP/OpenACC/!GCC$ (PR94709) · 4ea769a9
While '!$' with -fopenmp unsets too often load_line's seen_comment flag, this only affects <tab> warnings; for trunction warnings, gfc_next_char_literal re-handles the directives correctly. In terms of missed warnings, a directive that is completely in the truncated part is not diagnosted (as it starts with a '!'). PR fortran/94709 * scanner.c (load_line): In fixed form, also treat 'C' as comment and 'D'/'d' only with -fd-lines-as-comments. Treat '!$' with -fopenmp, '!$acc' with -fopenacc and '!GCC$' as non-comment to permit <tab> and truncation warnings. PR fortran/94709 * gfortran.dg/gomp/warn_truncated.f: New. * gfortran.dg/gomp/warn_truncated.f90: New.
Tobias Burnus committed