[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 18 Sep 2009 14:01:37 +0000 (16:01 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 18 Sep 2009 14:01:37 +0000 (16:01 +0200)
2009-09-18  Pascal Obry  <obry@adacore.com>

* mingw32.h: Activate Unicode support for x86-64 Windows platform.

2009-09-18  Vadim Godunko  <godunko@adacore.com>

* s-oscons-tmplt.c: Add circuit for handling IOV_MAX macro on IRIX.

2009-09-18  Javier Miranda  <miranda@adacore.com>

* exp_aggr.adb (Backend_Processing_Possible): Disable backend
processing for array aggregates in the VM backend if the array has
aliased components.

2009-09-18  Ed Schonberg  <schonberg@adacore.com>

* sem_ch4.adb (Analyze_Indexed_Component): Emit error if the type of
the prefix indicates a previous semantic error, and this is the first
error in the program.

2009-09-18  Bob Duff  <duff@adacore.com>

* gnat_ugn.texi: Minor editing.

From-SVN: r151844

gcc/ada/ChangeLog
gcc/ada/exp_aggr.adb
gcc/ada/gnat_ugn.texi
gcc/ada/mingw32.h
gcc/ada/s-oscons-tmplt.c
gcc/ada/sem_ch4.adb

index 3729771d303d6ee48a3ac7b66fa5e145d4e3b6bb..41711f429d8dbce997793dbe3cfb0bf2e41b6abf 100644 (file)
@@ -1,3 +1,27 @@
+2009-09-18  Pascal Obry  <obry@adacore.com>
+
+       * mingw32.h: Activate Unicode support for x86-64 Windows platform.
+
+2009-09-18  Vadim Godunko  <godunko@adacore.com>
+
+       * s-oscons-tmplt.c: Add circuit for handling IOV_MAX macro on IRIX.
+
+2009-09-18  Javier Miranda  <miranda@adacore.com>
+
+       * exp_aggr.adb (Backend_Processing_Possible): Disable backend
+       processing for array aggregates in the VM backend if the array has
+       aliased components.
+
+2009-09-18  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch4.adb (Analyze_Indexed_Component): Emit error if the type of
+       the prefix indicates a previous semantic error, and this is the first
+       error in the program.
+
+2009-09-18  Bob Duff  <duff@adacore.com>
+
+       * gnat_ugn.texi: Minor editing.
+
 2009-09-18  Vincent Celier  <celier@adacore.com>
 
        * prj.ads, prj.adb (Project_Data): New component
index 15338e4b24b80313b3dbe5d1e5da56c5600a6f55..913e46df3747feab2f360b6287c36f41205fd8c3 100644 (file)
@@ -56,6 +56,7 @@ with Sem_Util; use Sem_Util;
 with Sinfo;    use Sinfo;
 with Snames;   use Snames;
 with Stand;    use Stand;
+with Targparm; use Targparm;
 with Tbuild;   use Tbuild;
 with Uintp;    use Uintp;
 
@@ -216,7 +217,7 @@ package body Exp_Aggr is
 
    function Backend_Processing_Possible (N : Node_Id) return Boolean;
    --  This function checks if array aggregate N can be processed directly
-   --  by Gigi. If this is the case True is returned.
+   --  by the backend. If this is the case True is returned.
 
    function Build_Array_Aggr_Code
      (N           : Node_Id;
@@ -508,6 +509,8 @@ package body Exp_Aggr is
 
    --   10. No controlled actions need to be generated for components
 
+   --   11. The backend is a No_VM backend and the array has aliased components
+
    function Backend_Processing_Possible (N : Node_Id) return Boolean is
       Typ : constant Entity_Id := Etype (N);
       --  Typ is the correct constrained array subtype of the aggregate
@@ -634,6 +637,16 @@ package body Exp_Aggr is
          return False;
       end if;
 
+      --  Checks 11: Array aggregates with aliased components are currently
+      --  not well supported by the VM backend; disable temporarily this
+      --  backend processing until it is definitely supported.
+
+      if VM_Target /= No_VM
+        and then Has_Aliased_Components (Base_Type (Typ))
+      then
+         return False;
+      end if;
+
       --  Backend processing is possible
 
       Set_Size_Known_At_Compile_Time (Etype (N), True);
@@ -4622,6 +4635,7 @@ package body Exp_Aggr is
             end if;
 
             Aggr_In := First_Index (Etype (N));
+
             if Nkind (Parent (N)) = N_Assignment_Statement then
                Obj_In  := First_Index (Etype (Name (Parent (N))));
 
index 7a65203b7fe0047b2a71648982aaabf48513f339..d777f6dd09922a3f3d548485441e2a9c825996eb 100644 (file)
@@ -7389,7 +7389,7 @@ through the compilation and binding steps.
 
 @table @option
 
-@item -gnatem^^=^@var{path}
+@item -gnatem=@var{path}
 @cindex @option{-gnatem} (@command{gcc})
 A mapping file is a way to communicate to the compiler two mappings:
 from unit names to file names (without any directory information) and from
@@ -7401,15 +7401,14 @@ compiler, but mapping files can improve efficiency, particularly when
 sources are read over a slow network connection. In normal operation,
 you need not be concerned with the format or use of mapping files,
 and the @option{-gnatem} switch is not a switch that you would use
-explicitly. it is intended only for use by automatic tools such as
+explicitly. It is intended primarily for use by automatic tools such as
 @command{gnatmake} running under the project file facility. The
 description here of the format of mapping files is provided
 for completeness and for possible use by other tools.
 
-A mapping file is a sequence of sets of three lines. In each set,
-the first line is the unit name, in lower case, with ``@code{%s}''
-appended for
-specs and ``@code{%b}'' appended for bodies; the second line is the
+A mapping file is a sequence of sets of three lines. In each set, the
+first line is the unit name, in lower case, with @code{%s} appended
+for specs and @code{%b} appended for bodies; the second line is the
 file name; and the third line is the path name.
 
 Example:
@@ -7419,16 +7418,16 @@ Example:
    /gnat/project1/sources/main.2.ada
 @end smallexample
 
-When the switch @option{-gnatem} is specified, the compiler will create
-in memory the two mappings from the specified file. If there is any problem
-(nonexistent file, truncated file or duplicate entries), no mapping will
-be created.
+When the switch @option{-gnatem} is specified, the compiler will
+create in memory the two mappings from the specified file. If there is
+any problem (nonexistent file, truncated file or duplicate entries),
+no mapping will be created.
 
-Several @option{-gnatem} switches may be specified; however, only the last
-one on the command line will be taken into account.
+Several @option{-gnatem} switches may be specified; however, only the
+last one on the command line will be taken into account.
 
-When using a project file, @command{gnatmake} create a temporary mapping file
-and communicates it to the compiler using this switch.
+When using a project file, @command{gnatmake} creates a temporary
+mapping file and communicates it to the compiler using this switch.
 
 @end table
 
@@ -9267,16 +9266,19 @@ the objects.
 
 @item ^-C^/MAPPING^
 @cindex @option{^-C^/MAPPING^} (@command{gnatmake})
-Use a temporary mapping file. A mapping file is a way to communicate to the
-compiler two mappings: from unit names to file names (without any directory
-information) and from file names to path names (with full directory
-information). These mappings are used by the compiler to short-circuit the path
-search. When @command{gnatmake} is invoked with this switch, it will create
-a temporary mapping file, initially populated by the project manager,
-if @option{^-P^/PROJECT_FILE^} is used, otherwise initially empty.
-Each invocation of the compiler will add the newly accessed sources to the
-mapping file. This will improve the source search during the next invocation
-of the compiler.
+Use a temporary mapping file. A mapping file is a way to communicate
+to the compiler two mappings: from unit names to file names (without
+any directory information) and from file names to path names (with
+full directory information). A mapping file can make the compiler's
+file searches faster, especially if there are many source directories,
+or the sources are read over a slow network connection. If
+@option{^-P^/PROJECT_FILE^} is used, a mapping file is always used, so
+@option{^-C^/MAPPING^} is unnecessary; in this case the mapping file
+is initially populated based on the project file. If
+@option{^-C^/MAPPING^} is used without
+@option{^-P^/PROJECT_FILE^},
+the mapping file is initially empty. Each invocation of the compiler
+will add any newly accessed sources to the mapping file.
 
 @item ^-C=^/USE_MAPPING_FILE=^@var{file}
 @cindex @option{^-C=^/USE_MAPPING^} (@command{gnatmake})
index 011e90bb2705205308750727d971b66da2e9a989..f11572e7c2ad11c901637d060dcacaccf5ccac77 100644 (file)
@@ -44,7 +44,8 @@
 
 #if (((__MINGW32_MAJOR_VERSION == 3 \
                   && __MINGW32_MINOR_VERSION >= 9) \
-     || (__MINGW32_MAJOR_VERSION >= 4)) \
+     || (__MINGW32_MAJOR_VERSION >= 4) \
+     || defined (__MINGW64))          \
      && !defined (RTX))
 #define GNAT_UNICODE_SUPPORT
 
index c1075d6812618c6338531454f0977b40ea58b7c2..48938d9d9d15a32269c417cd97fbb2f844a448e7 100644 (file)
@@ -79,8 +79,16 @@ pragma Style_Checks ("M32766");
  **/
 
 #if defined (__linux__) && !defined (_XOPEN_SOURCE)
-/* For Linux _XOPEN_SOURCE must be defined, otherwise IOV_MAX is not defined */
+/** For Linux _XOPEN_SOURCE must be defined, otherwise IOV_MAX is not defined
+ **/
 #define _XOPEN_SOURCE 500
+
+#elif defined (__mips) && defined (__sgi)
+/** For IRIX _XOPEN5 must be defined and _XOPEN_IOV_MAX must be used as IOV_MAX,
+ ** otherwise IOV_MAX is not defined.
+ **/
+#define _XOPEN5
+#define IOV_MAX _XOPEN_IOV_MAX
 #endif
 
 #include <stdlib.h>
index 28856d0f24dda82ebf573a515e584e1213819071..99c24a12a2e8573adbc32def89847862769a31db 100644 (file)
@@ -1712,6 +1712,20 @@ package body Sem_Ch4 is
 
             elsif Array_Type = Any_Type then
                Set_Etype (N, Any_Type);
+
+               --  In most cases the analysis of the prefix will have emitted
+               --  an error already, but if the prefix may be interpreted as a
+               --  call in prefixed notation, the report is left to the caller.
+               --  To prevent cascaded errors, report only if no previous ones.
+
+               if Serious_Errors_Detected = 0 then
+                  Error_Msg_N ("invalid prefix in indexed component", P);
+
+                  if Nkind (P) = N_Expanded_Name then
+                     Error_Msg_NE ("\& is not visible", P, Selector_Name (P));
+                  end if;
+               end if;
+
                return;
 
             --  Here we definitely have a bad indexing
@@ -6689,6 +6703,7 @@ package body Sem_Ch4 is
 
          begin
             return Present (Visible_Op)
+              and then Scope (Op) = Scope (Visible_Op)
               and then not Comes_From_Source (Visible_Op)
               and then Alias (Visible_Op) = Op
               and then not Is_Hidden (Visible_Op);