aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/layout.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-05-19 11:37:47 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-07 16:23:15 +0000
commita547eea2669af282dfca4f3c38362f109b285308 (patch)
tree5cc8c1078625afb15eaebc43737cdb63f4c7bfee /gcc/ada/layout.adb
parent2d71668e64c4b20aec823dbe5a1feb6338d527a2 (diff)
downloadgcc-a547eea2669af282dfca4f3c38362f109b285308.zip
gcc-a547eea2669af282dfca4f3c38362f109b285308.tar.gz
gcc-a547eea2669af282dfca4f3c38362f109b285308.tar.bz2
[Ada] Fix bugs in Value_Size clauses and refactor
gcc/ada/ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Combine processing of Size and Value_Size clauses. Ensure that Value_Size is treated the same as Size, in the cases where both are allowed (i.e. the prefix denotes a first subtype). Misc cleanup. * einfo-utils.adb (Init_Size): Add assertions. (Size_Clause): Return a Value_Size clause if present, instead of just looking for a Size clause. * einfo.ads (Has_Size_Clause, Size_Clause): Change documentation to include Value_Size. * sem_ch13.ads, layout.ads, layout.adb: Comment modifications.
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r--gcc/ada/layout.adb10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb
index 5bafbcc..6dc4d7f 100644
--- a/gcc/ada/layout.adb
+++ b/gcc/ada/layout.adb
@@ -270,15 +270,15 @@ package body Layout is
Desig_Type := Non_Limited_View (Designated_Type (E));
end if;
- -- If Esize already set (e.g. by a size clause), then nothing further
- -- to be done here.
+ -- If Esize already set (e.g. by a size or value size clause), then
+ -- nothing further to be done here.
if Known_Esize (E) then
null;
- -- Access to subprogram is a strange beast, and we let the backend
- -- figure out what is needed (it may be some kind of fat pointer,
- -- including the static link for example.
+ -- Access to protected subprogram is a strange beast, and we let the
+ -- backend figure out what is needed (it may be some kind of fat
+ -- pointer, including the static link for example).
elsif Is_Access_Protected_Subprogram_Type (E) then
null;