From patchwork Wed Dec 1 10:25:37 2021 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: 48335 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 68F0C3858406 for ; Wed, 1 Dec 2021 10:36:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68F0C3858406 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1638355011; bh=r+yknSd+Ek8bTG2qqtwxOkBVzf1oODeUoqlABa6qMAc=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=BJ/BW9Sp/7fxAyMWDmyx0HbUvKOYz8Vd4ZXYDv/QvCuBT1bn7jk2FcBjnAsNfWpiR J5SW9+Wy05D7N+DKpLPXJwnhC0DB6iEQ3yBygERPDJcxOPRVXcOfaCmEqc+dDgN1ej raqyCjQnMKUhGOyCQhZWZe82jJiaLDS435/rchII= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 244903858014 for ; Wed, 1 Dec 2021 10:25:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 244903858014 Received: by mail-wr1-x430.google.com with SMTP id a9so51072080wrr.8 for ; Wed, 01 Dec 2021 02:25:41 -0800 (PST) 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=r+yknSd+Ek8bTG2qqtwxOkBVzf1oODeUoqlABa6qMAc=; b=Vo6Xq65roixrtIupa4F9NT4TmXdvqnxd5wHFn2KVxSJALY7dboyL9p/F3Svc/QYw+O fJvkMqD91rVcDa7friCiuKwoPZrfzkAaXn2EweI5j4CvifFZMczKT6aPHXiFxXaqg5sv n+p9fqAVhgwrBEoSjJZZ+X+MtU94TRGCpwQK3lL4X3MV6DfoML2+NwWGyGmyErk8RPUw xXY1+EMf9fS8wB5LWtzFCmomQ5aOEaWF+WfpC29u+cv5w1/nPDQKUvMoydZJkriPZ/QX O6kDX7NwNFZYUSzvrMiTCCPIc0bJnHKODmsKLpWqfsIkx0Ha/CD51er+P06PZgVIpU0u XcWg== X-Gm-Message-State: AOAM533cJuEBDDSYazx8he3FR54A/u01FxWLVeNnguB8LCbjBkFz7XdW Ml7Gzzvk1/cQoTJf5g37ciZZkIqwWM+Z5WYV X-Google-Smtp-Source: ABdhPJz64zv9YWPtgf9f4VAOrms1xevpHUKF+T5b5hVlxXu41lX2sGkUIa6CXhCZxLBKVCBhqCqU/Q== X-Received: by 2002:a5d:47a9:: with SMTP id 9mr5672804wrb.42.1638354340184; Wed, 01 Dec 2021 02:25:40 -0800 (PST) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id g19sm637355wmg.12.2021.12.01.02.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 02:25:38 -0800 (PST) Date: Wed, 1 Dec 2021 10:25:37 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix small discrepancy between -gnatG and -gnatD[G] outputs Message-ID: <20211201102537.GA1635195@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.3 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 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Eric Botcazou Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" The outputs generated for the same compilation by -gnatG and -gnatD[G] are not strictly identical: the former lacks a few freeze nodes, which can be quite confusing. So this change aligns the former with the latter. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sprint.ads (Source_Dump): Fix typo in comment. * sprint.adb (Source_Dump): Set Dump_Freeze_Null for both -gnatG and -gnatD. * switch-c.adb (Scan_Front_End_Switches) <'D'>: Remove obsolete kludge. diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -588,7 +588,7 @@ package body Sprint is Print_Generated_Code or Debug_Generated_Code; Dump_Original_Only := Debug_Flag_O; - Dump_Freeze_Null := Debug_Flag_S or Debug_Flag_G; + Dump_Freeze_Null := Debug_Flag_S or Dump_Generated_Only; -- Note that we turn off the tree dump flags immediately, before -- starting the dump. This avoids generating two copies of the dump diff --git a/gcc/ada/sprint.ads b/gcc/ada/sprint.ads --- a/gcc/ada/sprint.ads +++ b/gcc/ada/sprint.ads @@ -97,7 +97,7 @@ package Sprint is -- -dg print source from tree, including only the generated code -- -do print source from tree, including only the original code -- -df modify the above to include all units, not just the main unit - -- -sz print source from tree for package Standard + -- -dz print source from tree for package Standard procedure Sprint_Comma_List (List : List_Id); -- Prints the nodes in a list, with separating commas. If the list is empty diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -451,7 +451,6 @@ package body Switch.C is Debug_Generated_Code := True; Xref_Active := False; - Set_Debug_Flag ('g'); -- -gnate? (extended switches)