diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-05-02 12:18:12 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-05-02 12:18:12 +0200 |
commit | 42f11e4c26a824c2fa4b8f9bfc9e4af69fe86dc8 (patch) | |
tree | dbb33c2ad4d55daac28792110fc46b320436430c /gcc/ada/exp_pakd.adb | |
parent | 331e50151c7fbc9931899d0c10fa5fed7be4f8be (diff) | |
download | gcc-42f11e4c26a824c2fa4b8f9bfc9e4af69fe86dc8.zip gcc-42f11e4c26a824c2fa4b8f9bfc9e4af69fe86dc8.tar.gz gcc-42f11e4c26a824c2fa4b8f9bfc9e4af69fe86dc8.tar.bz2 |
[multiple changes]
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb, comperr.adb: Minor reformatting.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
unchecked conversion if the source size is 0 (indicating that
its RM size is unknown). This will happen with packed arrays of
non-discrete types, in which case the component type is known
to match.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* debug.adb: Reserve -gnatd.V.
2016-05-02 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Process_Full_View): Remove from visibility
wrappers of synchronized types to avoid spurious errors with
their wrapped entity.
* exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
if no interface primitive is covered by the subprogram and this is
not a primitive declared between two views; see Process_Full_View.
(Build_Protected_Sub_Specification): Link the dispatching
subprogram with its original non-dispatching protected subprogram
since their names differ.
(Expand_N_Protected_Type_Declaration):
If a protected subprogram overrides an interface primitive then
do not build a wrapper if it was already built.
* einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
* sem_ch4.adb (Names_Match): New subprogram.
* sem_ch6.adb (Check_Synchronized_Overriding): Moved
to library level and defined in the public part of the
package to invoke it from Exp_Ch9.Build_Wrapper_Spec
(Has_Matching_Entry_Or_Subprogram): New subprogram.
(Report_Conflict): New subprogram.
From-SVN: r235739
Diffstat (limited to 'gcc/ada/exp_pakd.adb')
-rw-r--r-- | gcc/ada/exp_pakd.adb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb index c8ba68a..ea82596 100644 --- a/gcc/ada/exp_pakd.adb +++ b/gcc/ada/exp_pakd.adb @@ -2298,9 +2298,12 @@ package body Exp_Pakd is -- convert to a modular type of the source length, since otherwise, on -- a big-endian machine, we get left-justification. We do it for little- -- endian machines as well, because there might be junk bits that are - -- not cleared if the type is not numeric. + -- not cleared if the type is not numeric. This can be done only if the + -- source siz is different from 0 (i.e. known), otherwise we must trust + -- the type declarations (case of non-discrete components). - if Source_Siz /= Target_Siz + if Source_Siz /= 0 + and then Source_Siz /= Target_Siz and then not Is_Discrete_Type (Source_Typ) then Src := Unchecked_Convert_To (RTE (Bits_Id (Source_Siz)), Src); |