From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EEC5F385AF83; Tue, 25 Jul 2023 13:45:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EEC5F385AF83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690292704; bh=PzK/LWyS6sSgAYys09PfosG8BdpX3CUwMkmeH6LazXc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nt+SxHThUSOL2RWLwUMPfOMPNdMf0KT5+c8wtF5ikfoQstZchkitLSrvtNdWEMgmn VxjOHSPdBRyuZjRQ6kEWhQoPiZ59q7fw4eUdympjiDySnM39Zqwdz/MV79idrIVoPm S0pQujmidPdORHHvGeZDFu/H2Dp5R26f4HGa5C6g= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/110725] [13/14 Regression] internal compiler error: in expand_expr_real_1, at expr.cc:10897 Date: Tue, 25 Jul 2023 13:45:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: accepts-invalid, ice-on-invalid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110725 --- Comment #7 from CVS Commits --- The master branch has been updated by Tobias Burnus : https://gcc.gnu.org/g:09dda270380fe13e7b4722305cb1122df1f779a0 commit r14-2761-g09dda270380fe13e7b4722305cb1122df1f779a0 Author: Tobias Burnus Date: Tue Jul 25 15:43:58 2023 +0200 OpenMP/Fortran: Reject declarations between target + teams While commit r14-2754-g2e31fe431b08b0302e1fa8a1c18ee51adafd41df detected executable statements, declarations do not show up as executable statements. Hence, we now check whether the first statement after TARGET is TEAMS - such that we can detect data statements like type or variable declarations. Fortran semantics ensures that only executable directives/statemens can come after '!$omp end teams' such that those can be detected with the previous check. Note that statements returning ST_NONE such as 'omp nothing' or 'omp error at(compilation)' will still slip through. PR fortran/110725 PR middle-end/71065 gcc/fortran/ChangeLog: * gfortran.h (gfc_omp_clauses): Add target_first_st_is_teams. * parse.cc (parse_omp_structured_block): Set it if the first statement in the structured block of a TARGET is TEAMS or a combined/composite starting with TEAMS. * openmp.cc (resolve_omp_target): Also show an error for contains_teams_construct without target_first_st_is_teams. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/teams-6.f90: New test.=