From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 33DCB386F42F; Thu, 26 Nov 2020 10:59:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33DCB386F42F From: "tschwinge at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/98011] New: [OpenACC] 'gcc/fortran/scanner.c:load_line' should consider 'flag_openacc' in addition to 'flag_openmp' (and vice versa?)? Date: Thu, 26 Nov 2020 10:59:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: openacc X-Bugzilla-Severity: normal X-Bugzilla-Who: tschwinge at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2020 10:59:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98011 Bug ID: 98011 Summary: [OpenACC] 'gcc/fortran/scanner.c:load_line' should consider 'flag_openacc' in addition to 'flag_openmp' (and vice versa?)? Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: openacc Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: burnus at gcc dot gnu.org, jakub at gcc dot gnu.org Target Milestone: --- It's not obvious (to me, at least), why in 'gcc/fortran/scanner.c:load_line' 'flag_openmp' and 'flag_openacc' are handled differently: /* For truncation and tab warnings, set seen_comment to false if one has either an OpenMP or OpenACC directive - or a !GCC$ attribute. If OpenMP is enabled, use '!$' as as conditional compilation sentinel and OpenMP directive ('!$omp'). */ if (seen_comment && first_comment && flag_openmp && comment_ix + 1 =3D= =3D i && c =3D=3D '$') first_comment =3D seen_comment =3D false; if (seen_comment && first_comment && comment_ix + 4 =3D=3D i) { if (((*pbuf)[comment_ix+1] =3D=3D 'g' || (*pbuf)[comment_ix+1] =3D= =3D 'G') && ((*pbuf)[comment_ix+2] =3D=3D 'c' || (*pbuf)[comment_ix+2] = =3D=3D 'C') && ((*pbuf)[comment_ix+3] =3D=3D 'c' || (*pbuf)[comment_ix+3] = =3D=3D 'C') && c =3D=3D '$') first_comment =3D seen_comment =3D false; if (flag_openacc && (*pbuf)[comment_ix+1] =3D=3D '$' && ((*pbuf)[comment_ix+2] =3D=3D 'a' || (*pbuf)[comment_ix+2] = =3D=3D 'A') && ((*pbuf)[comment_ix+3] =3D=3D 'c' || (*pbuf)[comment_ix+3] = =3D=3D 'C') && (c =3D=3D 'c' || c =3D=3D 'C')) first_comment =3D seen_comment =3D false; } Shouldn't this also be handled vice versa? If that indeed is meant to be different, then let's please add some "dummy handling"/commentary to make this explicit, to show that we did consider th= is.=