From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 7DAF43815FE1 for ; Mon, 30 May 2022 08:32:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7DAF43815FE1 Received: by mail-wr1-x436.google.com with SMTP id q7so2641348wrg.5 for ; Mon, 30 May 2022 01:32:48 -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=hniJjhPvLWqt+qwCZcMwKLVQpHRZnW1NkLy4eNIBdtQ=; b=adlvE8vmTGbKpeCoU5VNtrNhXG6ktiOZEFUSJlzZWimEUAJLZTjBMHKJS4Z3W2wDzF MvUxpgBDsarYaDwSpOaJgjHZrrhwb0UkTUjv8N28gRuelaHRtXAGIRZznBWgcgD8k/E7 7zPRGibTrcqk0JNzp80vYucPxDbeZH0E1Lc2Z8F1KiVEtM1fAuoYEac0h4NsSOUmLaKp KJFACtMzeHa2oIh36TDE1H86+uTnvsHdt70tA4teahr4PvHVQH3NMGQ7Ue8IfjKmDOlg Y4u0ioUvpCV8AP1PAE6flCKF9pglLfi0Wv26iXijS6HKOsN6zDUUyzahkaOqKgQAMA7I l66g== X-Gm-Message-State: AOAM530EScJ3eHtRXC3kUBTa+ng9A479BPkYWTOclTPFVBAdYu8vueJK WOJ0jB2S7u5FrlgMGIkxFoDuGJwFRDFG9g== X-Google-Smtp-Source: ABdhPJzKE8bIp/+HDUE6ApBUXrsiVLwLYXk24ExYwoPuZqoXb9tWrepPwbJce6B5GXCKPspnu/hpLg== X-Received: by 2002:adf:e991:0:b0:210:3222:cd1e with SMTP id h17-20020adfe991000000b002103222cd1emr4140257wrm.49.1653899567343; Mon, 30 May 2022 01:32:47 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id t125-20020a1c4683000000b00395f15d993fsm9575666wma.5.2022.05.30.01.32.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 01:32:46 -0700 (PDT) Date: Mon, 30 May 2022 08:32:46 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [Ada] Do not freeze specifically for dispatch tables Message-ID: <20220530083246.GA210785@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" 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, 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-List-Received-Date: Mon, 30 May 2022 08:32:49 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The left-overs of the old freezing code in Make_DT are now redundant since the semantic analyzer performs the same task for the 'Access attribute. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_disp.adb (Make_DT): Remove remaining freezing code. --5vNYLRcllDrimb99 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -4469,35 +4469,6 @@ package body Exp_Disp is Parent_Typ := Full_View (Parent_Typ); end if; - -- Ensure that all the primitives are frozen. This is only required when - -- building static dispatch tables: the primitives must be frozen to be - -- referenced, otherwise we have problems with the back end. But this is - -- not a requirement with nonstatic dispatch tables because in this case - -- we generate an empty dispatch table at this point and the extra code - -- required to register the primitives in their slot will be generated - -- later, when each primitive is frozen (see Freeze_Subprogram). - - if Building_Static_DT (Typ) then - declare - F_List : List_Id; - Prim : Entity_Id; - Prim_Elmt : Elmt_Id; - - begin - Prim_Elmt := First_Elmt (Primitive_Operations (Typ)); - while Present (Prim_Elmt) loop - Prim := Node (Prim_Elmt); - F_List := Freeze_Entity (Prim, Typ, Do_Freeze_Profile => False); - - if Present (F_List) then - Append_List_To (Result, F_List); - end if; - - Next_Elmt (Prim_Elmt); - end loop; - end; - end if; - if not Is_Interface (Typ) and then Has_Interfaces (Typ) then declare Cannot_Have_Null_Disc : Boolean := False; --5vNYLRcllDrimb99--