public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4291] [Ada] Simplify code for checks within an initialization procedure
@ 2021-10-11 13:38 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-11 13:38 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:6b1c091238aa00a25346266ae2aece880f749c3a

commit r12-4291-g6b1c091238aa00a25346266ae2aece880f749c3a
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Mon Sep 27 16:37:57 2021 +0200

    [Ada] Simplify code for checks within an initialization procedure
    
    gcc/ada/
    
            * sem_util.adb (Compile_Time_Constraint_Error): Simplify getting
            the type of the first formal parameter.

Diff:
---
 gcc/ada/sem_util.adb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 20e4395e4f3..63d0217dc6f 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -6590,9 +6590,7 @@ package body Sem_Util is
                if Inside_Init_Proc then
                   declare
                      Init_Proc_Type : constant Entity_Id :=
-                       Entity (Parameter_Type (First
-                                 (Parameter_Specifications
-                                    (Parent (Current_Scope_No_Loops)))));
+                       Etype (First_Formal (Current_Scope_No_Loops));
 
                      Conc_Typ : constant Entity_Id :=
                        (if Present (Init_Proc_Type)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-11 13:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 13:38 [gcc r12-4291] [Ada] Simplify code for checks within an initialization procedure Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).