From: Arnaud Charlet Date: Tue, 2 Aug 2011 09:03:13 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b60a3f26749e5aa873754f022ed8be0c6c67bf1d;p=gcc.git [multiple changes] 2011-08-02 Ed Schonberg * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype reference when needed. 2011-08-02 Bob Duff * gnat_ugn.texi: Fix typo. 2011-08-02 Vincent Celier * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of archive file name. Do not use the full path name of archives for Open VMS. From-SVN: r177097 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 02238304889..8003041ea09 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,18 @@ +2011-08-02 Ed Schonberg + + * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype + reference when needed. + +2011-08-02 Bob Duff + + * gnat_ugn.texi: Fix typo. + +2011-08-02 Vincent Celier + + * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of + archive file name. Do not use the full path name of archives for Open + VMS. + 2011-08-02 Robert Dewar * sem_ch12.adb, sem_ch11.adb: New calling sequence for diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 8d0c8a400c1..0174bd71bd4 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -16424,10 +16424,10 @@ replace colons with semicolons in the assignments to these variables. @font@heightrm=cmr8 @heightrm @end iftex -# In this example, we create both ADA_INCLUDE_PATH and ADA_OBJECT_PATH. +# In this example, we create both ADA_INCLUDE_PATH and ADA_OBJECTS_PATH. # This is the same thing as putting the -I arguments on the command line. # (the equivalent of using -aI on the command line would be to define -# only ADA_INCLUDE_PATH, the equivalent of -aO is ADA_OBJECT_PATH). +# only ADA_INCLUDE_PATH, the equivalent of -aO is ADA_OBJECTS_PATH). # You can of course have different values for these variables. # # Note also that we need to keep the previous values of these variables, since @@ -16444,9 +16444,9 @@ space:=$@{empty@} $@{empty@} SOURCE_LIST := $@{subst $@{space@},:,$@{SOURCE_DIRS@}@} OBJECT_LIST := $@{subst $@{space@},:,$@{OBJECT_DIRS@}@} ADA_INCLUDE_PATH += $@{SOURCE_LIST@} -ADA_OBJECT_PATH += $@{OBJECT_LIST@} +ADA_OBJECTS_PATH += $@{OBJECT_LIST@} export ADA_INCLUDE_PATH -export ADA_OBJECT_PATH +export ADA_OBJECTS_PATH all: gnatmake main_unit diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 4aac5b86a65..5bf466633fc 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -6067,7 +6067,8 @@ package body Make is for Index in 1 .. Library_Projs.Last loop if Library_Projs.Table - (Index).Library_Kind = Static + (Index).Library_Kind = Static + and then not Targparm.OpenVMS_On_Target then Linker_Switches.Increment_Last; Linker_Switches.Table (Linker_Switches.Last) := @@ -6080,7 +6081,8 @@ package body Make is Get_Name_String (Library_Projs.Table (Index). Library_Name) & - ".a"); + "." & + MLib.Tgt.Archive_Ext); else -- Add the -L switch diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index ec1ff216080..2d2a545ae4c 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -14988,6 +14988,19 @@ package body Sem_Ch3 is else T := Process_Subtype (Obj_Def, Related_Nod); + + -- If expansion is disabled an object definition that is an aggregate + -- will not get expanded and may lead to scoping problems in the back + -- end, if the object is referenced in an inner scope. In that case + -- create an itype reference for the object definition now. This + -- may be redundant in some cases, but harmless. + + if Is_Itype (T) + and then Nkind (Related_Nod) = N_Object_Declaration + and then ASIS_Mode + then + Build_Itype_Reference (T, Related_Nod); + end if; end if; return T;