diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-29 13:30:02 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-29 13:30:02 +0000 |
commit | 04d38ee4ac2b0b323eb71d2e5700ee7497053deb (patch) | |
tree | a13d4e97d170aea1ae20a7e9f582a348dce4a2bd /gcc/ada/exp_ch6.adb | |
parent | 617767399668771ee82c740e448cde8f7d1ba6b1 (diff) | |
download | gcc-04d38ee4ac2b0b323eb71d2e5700ee7497053deb.tar.gz |
2014-07-29 Robert Dewar <dewar@adacore.com>
* einfo.adb (Derived_Type_Link): New function
(Set_Derived_Type_Link): New procedure.
(Write_Field31_Name): Output Derived_Type_Link.
* einfo.ads: New field Derived_Type_Link.
* exp_ch6.adb (Expand_Call): Warn if change of representation
needed on call.
* sem_ch13.adb: Minor addition of ??? comment.
(Rep_Item_Too_Late): Warn on case that is legal but could cause an
expensive implicit conversion.
* sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
to DF_Id. Add new local variable DF_Call. Do not perform any
elaboration-related checks on the call to the partial finalization
routine within an init proc to avoid generating bogus elaboration
warnings on expansion-related code.
* sem_elab.adb (Check_A_Call): Move constant Access_Case to
the top level of the routine. Ensure that Output_Calls takes
into account flags -gnatel and -gnatwl when emitting warnings
or info messages.
(Check_Internal_Call_Continue): Update the call to Output_Calls.
(Elab_Warning): Moved to the top level of routine Check_A_Call.
(Emit): New routines.
(Output_Calls): Add new formal parameter Check_Elab_Flag along with a
comment on usage. Output all warnings or info messages only when the
caller context demands it and the proper elaboration flag is set.
2014-07-29 Yannick Moy <moy@adacore.com>
* sem_attr.adb (Analyze_Attribute/Attribute_Old):
Check rule about Old appearing in potentially unevaluated
expression everywhere, not only in Post.
2014-07-29 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb: Update comment.
* a-except.adb, a-except-2005.adb: Minor editing.
2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
* exp_dbug.adb (Debug_Renaming_Declaration):
Do not create renaming entities for renamings of non-packed
objects and for exceptions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213175 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 703a4279d48..2e4ef82aea1 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -3705,19 +3705,27 @@ package body Exp_Ch6 is Resolve (Actual, Parent_Typ); end if; + -- If there is a change of representation, then generate a + -- warning, and do the change of representation. + + elsif not Same_Representation (Formal_Typ, Parent_Typ) then + Error_Msg_N + ("??change of representation required", Actual); + Convert (Actual, Parent_Typ); + -- For array and record types, the parent formal type and -- derived formal type have different sizes or pragma Pack -- status. elsif ((Is_Array_Type (Formal_Typ) - and then Is_Array_Type (Parent_Typ)) + and then Is_Array_Type (Parent_Typ)) or else (Is_Record_Type (Formal_Typ) - and then Is_Record_Type (Parent_Typ))) + and then Is_Record_Type (Parent_Typ))) and then (Esize (Formal_Typ) /= Esize (Parent_Typ) - or else Has_Pragma_Pack (Formal_Typ) /= - Has_Pragma_Pack (Parent_Typ)) + or else Has_Pragma_Pack (Formal_Typ) /= + Has_Pragma_Pack (Parent_Typ)) then Convert (Actual, Parent_Typ); end if; |