From patchwork Tue May 17 08:27:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 54079 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F201F3857343 for ; Tue, 17 May 2022 08:46:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F201F3857343 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1652777196; bh=YYNMAwlEf6BFu9JuW+wUInIopW3HuKd1A6Mhcu700TQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=g+yg+G0UquhokEe9HjSyy1uBkn4PCLWo6bniOPeI0gkQ8D2gho0NdExtx7+ewAPDY gYzkn/5vFIz5UCW19BrYos3ycX9Wie1rDX+snnQIFI1xqC7kdRVjfgGG7owS2k2wE1 w+H9Boraw20+Ugv2lrb2+Vx05g+v4uuFVU8S3oKU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 9116A3857419 for ; Tue, 17 May 2022 08:27:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9116A3857419 Received: by mail-wm1-x32d.google.com with SMTP id bg25so9993955wmb.4 for ; Tue, 17 May 2022 01:27:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=YYNMAwlEf6BFu9JuW+wUInIopW3HuKd1A6Mhcu700TQ=; b=heVgc4DvCFWwxKXymuMy28+kpXZiB6ig1bYNG0loxZpse1TYXpLEM0/CMZRHOTKGRm 4M+56RiwJv7aFBWl5TKWPYM5C5D7ORUB1fx04IyxFWWLafSq+gQHWnuXNg5j4SLD1A4/ n56GNlfygGzVUYeI7QwZId8p5M4yxmHMQak+ZqoHJI294CLP3VJCoqHwHqjYocMErZ0r EkTb8HkgrfVg/S5ciARLc+zyWnelnA5FE+kFIiLvApLnTtHxy1mZ5tTbpYtyX9CZlT+9 +ogGjpVJYmnsZLnaXf7Us7f/QFdU0bsAXJ1YICdwQy3XaVgK0QvNQQ++iLxGdrTHN0Ur DgIQ== X-Gm-Message-State: AOAM533CBx7O/tdvHOOPog8V/YV9VbzMvOq0+4vobUlG2UGMcAI8YErF W1kn5SqPB4pn3+Sz94D2tGcc9DNDanFjBgrr X-Google-Smtp-Source: ABdhPJxOe/fER3s76Glhk407g+kpBGJDj2nSwhY/YVgsEz+810YLltpv2f/dXfRl3gLwkwakHrN+sA== X-Received: by 2002:a7b:cf36:0:b0:396:f50c:da05 with SMTP id m22-20020a7bcf36000000b00396f50cda05mr13884545wmg.90.1652776067163; Tue, 17 May 2022 01:27:47 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id x10-20020adfbb4a000000b0020d0435c97bsm6914389wrg.92.2022.05.17.01.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 01:27:46 -0700 (PDT) Date: Tue, 17 May 2022 08:27:46 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Requires_Cleanup_Actions and N_Protected_Body Message-ID: <20220517082746.GA1089835@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Bob Duff Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This patch disallows N_Protected_Body from being passed to Requires_Cleanup_Actions. Protected bodies never need cleanup, and are never passed to Requires_Cleanup_Actions, which is a good thing, because it would blow up on Handled_Statement_Sequence, which doesn't exist for N_Protected_Body. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.adb (Requires_Cleanup_Actions): Remove N_Protected_Body from the case statement, so that case will be covered by "raise Program_Error". diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -12781,7 +12781,6 @@ package body Exp_Util is | N_Block_Statement | N_Entry_Body | N_Package_Body - | N_Protected_Body | N_Subprogram_Body | N_Task_Body =>