From patchwork Tue Oct 31 13:18:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1857565 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SKW1v5XTwz1yQZ for ; Wed, 1 Nov 2023 00:19:15 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2AF753858413 for ; Tue, 31 Oct 2023 13:19:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 774893858D1E for ; Tue, 31 Oct 2023 13:19:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 774893858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 774893858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698758342; cv=none; b=ERMLIZU9UIgnmC/EgyX9zMHduVYEpMvAvR8dTH25Uc8ihn9k0iUUtHzQlHKmXAzGwALXh/mqGNnB8A936+NGmtmmtHqXjnuCB9ARvGQqZrw9zE1HRNwsww/Ef23LUCtUExZFGOcB5rrOhQqsVzxt4S5LaiQBwe23Q7b+zLmCZVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698758342; c=relaxed/simple; bh=WCG/sqVdKuZk8Zt9RXMVYR9tTbYSERNsnw510tCFWcE=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=JHsMwXkzTpavB+ChWrxtxEpniIGeg+wI/JY0jcNg1iKPDR/O6+9+bifFKDaqHODgFpZ1tYAuYsYPJBcC305+8Wt8brPC7m6IWqXpy/UwmJmiRrli5dbGRCD9tlbHIrmwwUcB+MLFIurmj+ObYxr6HEV5z51WPku4ggU0qbTsKag= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: QsxBw0FsSWaZ5t19Cbg4cQ== X-CSE-MsgGUID: mN1PL+VgR/+U+b6UzPKuFQ== X-IronPort-AV: E=Sophos;i="6.03,265,1694764800"; d="diff'?scan'208";a="21397936" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 31 Oct 2023 05:18:57 -0800 IronPort-SDR: QLspH3UlFnLkGH8SmidYC6i0D4vpdp0+hGF9DMtDfUE5aTAB34pJonkK2rhlc0ydPPoYxE7QSg xSCKhxifeIWnRR6S4oL9IzxDpGUB90COx+++BxBW6/xsrRrjcyDZyP0fltW/xpPhbYQ7uqQta/ Nde29m5UGzGZVJ9CvsmSjMsKv7HXjqJAJ5RuVwF4SFs6DAj2VTRM3tVqDLwZcBJVHo1K0hY7sc kly6c7JDDthjZcxFO1scogvKQJBcsDvuQNpZtsUywiHnxfeCCNiQ+sELSsicIzAPnJiJOZ45gl jhU= Message-ID: <56e022f9-06c8-4656-bcdf-b052fd0cae04@codesourcery.com> Date: Tue, 31 Oct 2023 14:18:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches From: Tobias Burnus Subject: [OG13][committed] OpenMP/Fortran: Fix parsing of metadirectives with BLOCK X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org This is an OG13-only patch as metadirectives are not yet on mainline. I think it is a side effect of the backported my mainline patch that fixed strictly-nested blocks that was backported to OG13 on Oct 8, 2023 in OG13 commit 36e5f02e64bd4b5b1eaf89993a63c56b01cd4e7c. Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 commit 46feedaddf8e4d82b7a24557c7bb4c8c3ee287a0 Author: Tobias Burnus Date: Tue Oct 31 12:03:44 2023 +0100 OpenMP/Fortran: Fix parsing of metadirectives with BLOCK Probably a fallout of the backport of r14-4471-g6a8edd50a149f1 Fortran/OpenMP: Fix handling of strictly structured blocks This showed up as parsing error/fail with libgomp.fortran/metadirective-1.f90 libgomp.fortran/metadirective-6.f90 gcc/fortran/ * decl.cc (gfc_match_end): Handle unnamed END BLOCK with metadirectives. --- gcc/fortran/ChangeLog.omp | 5 +++++ gcc/fortran/decl.cc | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp index 6b30302428f..e20a88b8740 100644 --- a/gcc/fortran/ChangeLog.omp +++ b/gcc/fortran/ChangeLog.omp @@ -1,3 +1,8 @@ +2023-10-31 Tobias Burnus + + * decl.cc (gfc_match_end): Handle unnamed END BLOCK with + metadirectives. + 2023-10-30 Tobias Burnus * trans-openmp.cc (gfc_trans_omp_clauses): Avoid gfc_evaluate_now diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc index 783c39438e8..4c04e64d37c 100644 --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -8409,6 +8409,9 @@ gfc_match_end (gfc_statement *st) && state_data->sym->abr_modproc_decl; } while (state == COMP_OMP_METADIRECTIVE); + + if (startswith (block_name, "block@")) + block_name = NULL; } break; default: