diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-23 11:01:32 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-23 11:01:32 +0200 |
commit | e2cc5258cad87a2a82fd07fe4cffa45eaabfe0ce (patch) | |
tree | 47ee806dd8fb95243c84dee353eada67ae6fb03c | |
parent | 2503cb81eefe3d14714b243c49bf36e5f7256597 (diff) | |
download | gcc-e2cc5258cad87a2a82fd07fe4cffa45eaabfe0ce.zip gcc-e2cc5258cad87a2a82fd07fe4cffa45eaabfe0ce.tar.gz gcc-e2cc5258cad87a2a82fd07fe4cffa45eaabfe0ce.tar.bz2 |
[multiple changes]
2010-06-23 Olivier Hainque <hainque@adacore.com>
* einfo.adb (Has_Foreign_Convention): Consider Intrinsic with
Interface_Name as foreign. These are GCC builtin imports for
which Ada specific processing doesn't apply.
2010-06-23 Thomas Quinot <quinot@adacore.com>
* sem_ch12.adb: Minor reformatting.
2010-06-23 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_VMS_Operator): Use scope of system extension to
determine whether an intrinsic subprogram is VMS specific.
2010-06-23 Hristian Kirtchev <kirtchev@adacore.com>
* treepr.adb (Print_Entity_Info): Output the contents of Field28 if it
is present in the entity.
From-SVN: r161262
-rw-r--r-- | gcc/ada/ChangeLog | 20 | ||||
-rw-r--r-- | gcc/ada/einfo.adb | 8 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 8 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 42 | ||||
-rw-r--r-- | gcc/ada/treepr.adb | 8 |
5 files changed, 61 insertions, 25 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index fff5856..d6ea819 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,23 @@ +2010-06-23 Olivier Hainque <hainque@adacore.com> + + * einfo.adb (Has_Foreign_Convention): Consider Intrinsic with + Interface_Name as foreign. These are GCC builtin imports for + which Ada specific processing doesn't apply. + +2010-06-23 Thomas Quinot <quinot@adacore.com> + + * sem_ch12.adb: Minor reformatting. + +2010-06-23 Ed Schonberg <schonberg@adacore.com> + + * sem_util.adb (Is_VMS_Operator): Use scope of system extension to + determine whether an intrinsic subprogram is VMS specific. + +2010-06-23 Hristian Kirtchev <kirtchev@adacore.com> + + * treepr.adb (Print_Entity_Info): Output the contents of Field28 if it + is present in the entity. + 2010-06-23 Arnaud Charlet <charlet@adacore.com> * xr_tabls.adb, xref_lib.adb: Update to latest lib-xref.ads diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 6105965..7769ff1 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -5850,7 +5850,13 @@ package body Einfo is function Has_Foreign_Convention (Id : E) return B is begin - return Convention (Id) in Foreign_Convention; + -- While regular Intrinsics such as the Standard operators fit in the + -- "Ada" convention, those with an Interface_Name materialize GCC + -- builtin imports for which Ada special treatments shouldn't apply. + + return Convention (Id) in Foreign_Convention + or else (Convention (Id) = Convention_Intrinsic + and then Present (Interface_Name (Id))); end Has_Foreign_Convention; --------------------------- diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index a50094d..ceb4dac 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -10864,8 +10864,8 @@ package body Sem_Ch12 is Get_Body_Name (Get_Unit_Name (Unit (Comp_Unit))); begin - -- In CodePeer mode, the missing body may make the - -- analysis incomplete, but we do not treat it as fatal. + -- In CodePeer mode, the missing body may make the analysis + -- incomplete, but we do not treat it as fatal. if CodePeer_Mode then return; @@ -10873,8 +10873,8 @@ package body Sem_Ch12 is else Error_Msg_Unit_1 := Bname; Error_Msg_N ("this instantiation requires$!", N); - Error_Msg_File_1 - := Get_File_Name (Bname, Subunit => False); + Error_Msg_File_1 := + Get_File_Name (Bname, Subunit => False); Error_Msg_N ("\but file{ was not found!", N); raise Unrecoverable_Error; end if; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 640e4ee..45f4e83 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -7214,10 +7214,14 @@ package body Sem_Util is function Is_VMS_Operator (Op : Entity_Id) return Boolean is begin + -- The VMS operators are declared in a child of System that is loaded + -- through pragma Extend_System. In some rare cases a program is run + -- with this extension but without indicating that the target is VMS. + return Ekind (Op) = E_Function and then Is_Intrinsic_Subprogram (Op) - and then Chars (Scope (Scope (Op))) = Name_System - and then OpenVMS_On_Target; + and then Present_System_Aux + and then Scope (Op) = System_Aux_Id; end Is_VMS_Operator; ----------------- @@ -7234,14 +7238,14 @@ package body Sem_Util is -- expansion. function In_Protected_Function (E : Entity_Id) return Boolean; - -- Within a protected function, the private components of the - -- enclosing protected type are constants. A function nested within - -- a (protected) procedure is not itself protected. + -- Within a protected function, the private components of the enclosing + -- protected type are constants. A function nested within a (protected) + -- procedure is not itself protected. function Is_Variable_Prefix (P : Node_Id) return Boolean; - -- Prefixes can involve implicit dereferences, in which case we - -- must test for the case of a reference of a constant access - -- type, which can never be a variable. + -- Prefixes can involve implicit dereferences, in which case we must + -- test for the case of a reference of a constant access type, which can + -- can never be a variable. --------------------------- -- In_Protected_Function -- @@ -7257,9 +7261,7 @@ package body Sem_Util is else S := Current_Scope; while Present (S) and then S /= Prot loop - if Ekind (S) = E_Function - and then Scope (S) = Prot - then + if Ekind (S) = E_Function and then Scope (S) = Prot then return True; end if; @@ -7304,16 +7306,16 @@ package body Sem_Util is if Nkind (N) in N_Subexpr and then Assignment_OK (N) then return True; - -- Normally we go to the original node, but there is one exception - -- where we use the rewritten node, namely when it is an explicit - -- dereference. The generated code may rewrite a prefix which is an - -- access type with an explicit dereference. The dereference is a - -- variable, even though the original node may not be (since it could - -- be a constant of the access type). + -- Normally we go to the original node, but there is one exception where + -- we use the rewritten node, namely when it is an explicit dereference. + -- The generated code may rewrite a prefix which is an access type with + -- an explicit dereference. The dereference is a variable, even though + -- the original node may not be (since it could be a constant of the + -- access type). - -- In Ada 2005 we have a further case to consider: the prefix may be - -- a function call given in prefix notation. The original node appears - -- to be a selected component, but we need to examine the call. + -- In Ada 2005 we have a further case to consider: the prefix may be a + -- function call given in prefix notation. The original node appears to + -- be a selected component, but we need to examine the call. elsif Nkind (N) = N_Explicit_Dereference and then Nkind (Orig_Node) /= N_Explicit_Dereference diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb index 6102453..087170f 100644 --- a/gcc/ada/treepr.adb +++ b/gcc/ada/treepr.adb @@ -627,6 +627,14 @@ package body Treepr is Print_Eol; end if; + if Field_Present (Field28 (Ent)) then + Print_Str (Prefix); + Write_Field28_Name (Ent); + Write_Str (" = "); + Print_Field (Field28 (Ent)); + Print_Eol; + end if; + Write_Entity_Flags (Ent, Prefix); end Print_Entity_Info; |