diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-16 10:44:09 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-16 10:44:09 +0000 |
commit | 0c9785522198cb79874b3277d0cc732707e75348 (patch) | |
tree | 6ac32ae21b13bb0214d13325a3baed1d0935dfc5 /gcc/ada/sem_util.adb | |
parent | 0fb1044f4c9dc43ef1cddc1e94a06ef5b4733279 (diff) | |
download | gcc-0c9785522198cb79874b3277d0cc732707e75348.tar.gz |
2015-10-16 Javier Miranda <miranda@adacore.com>
* inline.adb (Add_Inlined_Body): Ensure that
Analyze_Inlined_Bodies will be invoked after completing the
analysis of the current unit.
2015-10-16 Arnaud Charlet <charlet@adacore.com>
* sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Fix error
message for bad last bit position.
* sem_ch3.adb, sem_util.adb, sem_util.ads: Minor reformatting.
2015-10-16 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_N_Case_Statement): If expression is
compile-time known but does not obey a static predicate on
its type, replace the case statement with a raise statement,
as with other statically detected constraint violations.
2015-10-16 Bob Duff <duff@adacore.com>
* s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
Reinstate code.
* opt.ads: Minor typo.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228866 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r-- | gcc/ada/sem_util.adb | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 56f4d9378ca..4903d3f4dae 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -17109,6 +17109,10 @@ package body Sem_Util is -- This shouldn't be necessary, but without this check, we crash in -- gimplify. ??? + ------------------------------ + -- Caller_Known_Size_Record -- + ------------------------------ + function Caller_Known_Size_Record (Typ : Entity_Id) return Boolean is pragma Assert (Typ = Underlying_Type (Typ)); @@ -17118,9 +17122,10 @@ package body Sem_Util is end if; declare - Comp : Entity_Id := First_Entity (Typ); + Comp : Entity_Id; begin + Comp := First_Entity (Typ); while Present (Comp) loop -- Only look at E_Component entities. No need to look at @@ -17156,6 +17161,10 @@ package body Sem_Util is return True; end Caller_Known_Size_Record; + --------------------------- + -- Has_Discrim_Dep_Array -- + --------------------------- + function Has_Discrim_Dep_Array (Typ : Entity_Id) return Boolean is pragma Assert (Typ = Underlying_Type (Typ)); @@ -17165,13 +17174,14 @@ package body Sem_Util is end if; if Is_Record_Type (Typ) - or else - Is_Protected_Type (Typ) + or else + Is_Protected_Type (Typ) then declare - Comp : Entity_Id := First_Entity (Typ); + Comp : Entity_Id; begin + Comp := First_Entity (Typ); while Present (Comp) loop -- Only look at E_Component entities. No need to look at @@ -17182,7 +17192,6 @@ package body Sem_Util is declare Comp_Type : constant Entity_Id := Underlying_Type (Etype (Comp)); - begin if Has_Discrim_Dep_Array (Comp_Type) then return True; |