From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 0C012385AC22 for ; Mon, 9 May 2022 09:30:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0C012385AC22 Received: by mail-wm1-x336.google.com with SMTP id m2-20020a1ca302000000b003943bc63f98so7898661wme.4 for ; Mon, 09 May 2022 02:30:16 -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=1ITc11TCbTfAjDeyE9FWnMzWEFjG+CtUt6kycn/Ng1Q=; b=teNZHYU595f/s7KUwNOY41ZkujRg/RMzjeSDOdvBNiQ6uLlvmu6ZNOpCOI9BguNBeb PyFrzB+YUZivYJTQ10TrtKWNExxPEB1NnlQPww+lqer8LcwQkR6goeiV8SBr98H3c1Mz h+amiEqh5+zRc2TlMlkfwx8+nb28NveP3jsYzd3RkRngXh4wkv7agpliUpVRD2qM+K9X OhNsRMHYelioYRO5+zz2Ic4KoE0RcPf21qZhjy8sBdozUpfVlmMj6AYWeNrFbKfjgrPr XTuZdQyjin/QEgeJYKhlv6cyXmX4x1V3HL/Kc4PTGkkDX3weQZkRDS77DiqsyAuvIC83 phsg== X-Gm-Message-State: AOAM533Cc0KKtfNg4GLnakgJqdj7Evg50bixggVOhPQ9ynbmAksJIOER 3cSqjxknggQHPRtiKpPEzguP4dGsU6oCwQ== X-Google-Smtp-Source: ABdhPJxEsNLNzsk2gggq8lu8SbTizxRGlKk0L2ZxmR+Uqrvywt9aYha1K394O3zf5VSkyyU3oopr3A== X-Received: by 2002:a1c:e916:0:b0:38e:ac96:f477 with SMTP id q22-20020a1ce916000000b0038eac96f477mr21564809wmc.160.1652088614887; Mon, 09 May 2022 02:30:14 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id z22-20020a05600c0a1600b003942a244eddsm12542176wmp.34.2022.05.09.02.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:30:14 -0700 (PDT) Date: Mon, 9 May 2022 09:30:13 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [Ada] Remove redundant call to Set_Etype for attribute Bit_Order Message-ID: <20220509093013.GA3184112@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline X-Spam-Status: No, score=-13.1 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.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-List-Received-Date: Mon, 09 May 2022 09:30:22 -0000 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Node created by a call to New_Occurrence_Of (RTE (...), ...) has its Etype set. There is no need to follow it with a call to Set_Etype. Cleanup of various Analyze/Resolve routines. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Analyze_Attribute): Don't call Set_Etype for Bit_Order attribute. --OXfL5xGRrasGEqWY Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -3421,7 +3421,6 @@ package body Sem_Attr is New_Occurrence_Of (RTE (RE_Low_Order_First), Loc)); end if; - Set_Etype (N, RTE (RE_Bit_Order)); Resolve (N); -- Reset incorrect indication of staticness --OXfL5xGRrasGEqWY--