summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch9.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-30 15:21:46 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-30 15:21:46 +0000
commit1094a5ca9023daee0ba99e838c4b718610774080 (patch)
tree84b44adda5548733a0ba71ebd9458374b667579b /gcc/ada/sem_ch9.adb
parent50b3164db09945691ae3893177f827c1839e639b (diff)
downloadgcc-1094a5ca9023daee0ba99e838c4b718610774080.tar.gz
2012-07-30 Robert Dewar <dewar@adacore.com>
* bindusg.adb: Clarify file in -A lines. 2012-07-30 Robert Dewar <dewar@adacore.com> * freeze.adb: Minor reformatting. 2012-07-30 Robert Dewar <dewar@adacore.com> * gnatcmd.adb, makeutl.adb, makeutl.ads: Minor code reorganization. 2012-07-30 Vincent Pucci <pucci@adacore.com> * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Minor reformatting. * sem_ch9.adb (Allows_Lock_Free_Implementation): Minor reformatting. Capture the correct error message in case of a quantified expression. 2012-07-30 Thomas Quinot <quinot@adacore.com> * g-socket.adb (Get_Socket_Option, Set_Socket_Option): On Windows, the value is a milliseconds count in a DWORD, not a struct timeval. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189979 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch9.adb')
-rw-r--r--gcc/ada/sem_ch9.adb13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch9.adb b/gcc/ada/sem_ch9.adb
index 877ac4d0f38..524de4ce99b 100644
--- a/gcc/ada/sem_ch9.adb
+++ b/gcc/ada/sem_ch9.adb
@@ -530,7 +530,10 @@ package body Sem_Ch9 is
-- Quantified expression restricted
- elsif Kind = N_Quantified_Expression then
+ elsif Kind = N_Quantified_Expression
+ or else Nkind (Original_Node (N)) =
+ N_Quantified_Expression
+ then
if Lock_Free_Given then
Error_Msg_N ("quantified expression not allowed",
N);
@@ -552,7 +555,7 @@ package body Sem_Ch9 is
Id : constant Entity_Id := Entity (N);
Comp_Decl : Node_Id;
Comp_Id : Entity_Id := Empty;
- Comp_Size : Int;
+ Comp_Size : Int := 0;
Comp_Type : Entity_Id;
begin
@@ -579,6 +582,10 @@ package body Sem_Ch9 is
Layout_Type (Comp_Type);
+ -- Note that Known_Esize is used and not
+ -- Known_Static_Esize in order to capture the
+ -- errors properly at the instantiation point.
+
if Known_Esize (Comp_Type) then
Comp_Size := UI_To_Int (Esize (Comp_Type));
@@ -587,7 +594,7 @@ package body Sem_Ch9 is
-- (Value_Size) since it may have been set by an
-- explicit representation clause.
- else
+ elsif Known_RM_Size (Comp_Type) then
Comp_Size := UI_To_Int (RM_Size (Comp_Type));
end if;