forked from wangliu-iscas/gcc-patch
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ada: Fix address arithmetic issues in the runtime
This is most notably the addition of addresses in Interfaces.C.Pointers and System.Bitfield_Utils. There is also a change to System.Stream_Attributes, which was representing a thin pointer as a record, which is not problematic per se, but is in the end, because the expanded code performs an unchecked conversion from it to the access type instead of accessing the component. gcc/ada/ * libgnat/i-cpoint.adb: Add clauses for System.Storage_Elements. (Addr): Delete. (Offset): New subtype of Storage_Offset. (To_Offset): New instance of Unchecked_Conversion. (To_Pointer): Adjust. (To_Addr): Likewise. (To_Ptrdiff): Likewise. ("+"): Call To_Offset on the offset. ("-"): Likewise. * libgnat/s-bituti.adb: Add clauses for System.Storage_Elements. (Val_Bytes): Change type to Storage_Count. (Get_Val_2): Add qualification to second operand of mod operator. (Set_Val_2): Likewise. (Copy_Bitfield): Likewise. Change type of Src_Adjust & Dest_Adjust. * libgnat/s-stratt.ads (Thin_Pointer): Change to subtype of Address. * libgnat/s-statxd.adb (I_AD): Adjust. (I_AS): Likewise. (W_AS): Likewise. Tested on x86_64-pc-linux-gnu, committed on master.
- Loading branch information
1 parent
c2d62cd
commit f7cd5e0
Showing
4 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters