summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-10 14:34:26 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-10 14:34:26 +0000
commit14ade791121ae888d626b3dd558f9b6ffb4db622 (patch)
treeb877860313e1304b6652f4cf97e7a337ac6efded
parent91c6b0de93921ca4c8b3b9d098aeab6142f374b7 (diff)
downloadppe42-gcc-14ade791121ae888d626b3dd558f9b6ffb4db622.tar.gz
ppe42-gcc-14ade791121ae888d626b3dd558f9b6ffb4db622.zip
2010-09-10 Robert Dewar <dewar@adacore.com>
* frontend.adb: Minor reformatting. 2010-09-10 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_Conditional_Expression): Use P_Condition for condition * par-ch5.adb (P_Condition): Move from body to spec * par.adb (Ch5.P_Condition): Move from body to spec 2010-09-10 Ed Schonberg <schonberg@adacore.com> * exp_cg.adb (Write_Call_Info): If a type that has been registered in the call table is private, use its full view to generate information on its operations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164181 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog16
-rw-r--r--gcc/ada/exp_cg.adb8
-rw-r--r--gcc/ada/frontend.adb1
-rw-r--r--gcc/ada/par-ch4.adb2
-rw-r--r--gcc/ada/par-ch5.adb1
-rw-r--r--gcc/ada/par.adb7
6 files changed, 32 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 04c73a9fda2..11ff5dcffa9 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-10 Robert Dewar <dewar@adacore.com>
+
+ * frontend.adb: Minor reformatting.
+
+2010-09-10 Robert Dewar <dewar@adacore.com>
+
+ * par-ch4.adb (P_Conditional_Expression): Use P_Condition for condition
+ * par-ch5.adb (P_Condition): Move from body to spec
+ * par.adb (Ch5.P_Condition): Move from body to spec
+
+2010-09-10 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_cg.adb (Write_Call_Info): If a type that has been registered in
+ the call table is private, use its full view to generate information
+ on its operations.
+
2010-09-10 Jose Ruiz <ruiz@adacore.com>
* exp_cg.adb (Is_Predefined_Dispatching_Operation): When trying the
diff --git a/gcc/ada/exp_cg.adb b/gcc/ada/exp_cg.adb
index 376f9cadf60..425ae540526 100644
--- a/gcc/ada/exp_cg.adb
+++ b/gcc/ada/exp_cg.adb
@@ -129,6 +129,14 @@ package body Exp_CG is
Write_Call_Info (N);
else pragma Assert (Nkind (N) = N_Defining_Identifier);
+
+ -- The type may be a private untagged type whose completion is
+ -- tagged, in which case we must use the full tagged view.
+
+ if not Is_Tagged_Type (N) and then Is_Private_Type (N) then
+ N := Full_View (N);
+ end if;
+
pragma Assert (Is_Tagged_Type (N));
Write_Type_Info (N);
diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index bea0bdc396e..54616feae74 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -161,7 +161,6 @@ begin
if Source_gnat_adc /= No_Source_File then
Initialize_Scanner (No_Unit, Source_gnat_adc);
Config_Pragmas := Par (Configuration_Pragmas => True);
-
else
Config_Pragmas := Empty_List;
end if;
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
index 6de5e84aed9..2d388f67b5a 100644
--- a/gcc/ada/par-ch4.adb
+++ b/gcc/ada/par-ch4.adb
@@ -2788,7 +2788,7 @@ package body Ch4 is
end if;
Scan; -- past IF or ELSIF
- Append_To (Exprs, P_Expression_No_Right_Paren);
+ Append_To (Exprs, P_Condition);
TF_Then;
Append_To (Exprs, P_Expression);
diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb
index bbac0327ebc..30433ef208e 100644
--- a/gcc/ada/par-ch5.adb
+++ b/gcc/ada/par-ch5.adb
@@ -34,7 +34,6 @@ package body Ch5 is
function P_Case_Statement return Node_Id;
function P_Case_Statement_Alternative return Node_Id;
- function P_Condition return Node_Id;
function P_Exit_Statement return Node_Id;
function P_Goto_Statement return Node_Id;
function P_If_Statement return Node_Id;
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb
index bf3dc1e6b51..28c2ca789ee 100644
--- a/gcc/ada/par.adb
+++ b/gcc/ada/par.adb
@@ -709,6 +709,9 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is
-------------
package Ch5 is
+ function P_Condition return Node_Id;
+ -- Scan out and return a condition
+
function P_Statement_Name (Name_Node : Node_Id) return Node_Id;
-- Given a node representing a name (which is a call), converts it
-- to the syntactically corresponding procedure call statement.
@@ -1255,6 +1258,7 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is
-- Start of processing for Par
begin
+ Compiler_State := Parsing;
-- Deal with configuration pragmas case first
@@ -1266,10 +1270,12 @@ begin
begin
loop
if Token = Tok_EOF then
+ Compiler_State := Analyzing;
return Pragmas;
elsif Token /= Tok_Pragma then
Error_Msg_SC ("only pragmas allowed in configuration file");
+ Compiler_State := Analyzing;
return Error_List;
else
@@ -1479,6 +1485,7 @@ begin
Restore_Opt_Config_Switches (Save_Config_Switches);
Set_Comes_From_Source_Default (False);
+ Compiler_State := Analyzing;
return Empty_List;
end if;
end Par;
OpenPOWER on IntegriCloud