From: Eric Botcazou Date: Mon, 16 Dec 2019 10:35:05 +0000 (+0000) Subject: [Ada] Do not set a bogus Esize on subtype built for Component_Size clause X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cbd208038a63b4edaadd6b375ec5cdca5d90968;p=gcc.git [Ada] Do not set a bogus Esize on subtype built for Component_Size clause 2019-12-16 Eric Botcazou gcc/ada/ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Set only the RM_Size on the subtype built for a Component_Size clause when the component type is a biased integer type. From-SVN: r279437 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 13f7799d03d..e47c8382c3b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2019-12-16 Eric Botcazou + + * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Set only + the RM_Size on the subtype built for a Component_Size clause + when the component type is a biased integer type. + 2019-12-16 Arnaud Charlet * socket.c: Shutdown warning. diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index bbdb065908b..8ca731dc284 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -5476,7 +5476,7 @@ package body Sem_Ch13 is Analyze (Decl, Suppress => All_Checks); Set_Has_Delayed_Freeze (New_Ctyp, False); - Set_Esize (New_Ctyp, Csize); + Init_Esize (New_Ctyp); Set_RM_Size (New_Ctyp, Csize); Init_Alignment (New_Ctyp); Set_Is_Itype (New_Ctyp, True);