aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 11:43:16 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 11:43:16 +0200
commit49bfcf43817fb7d36f168ef2ba992b652747e0b2 (patch)
tree14bc2c85a3df74963dc24d3e23e51dbb300a8275 /gcc
parent3479844114fb9da80145e748af1ba33c93127f6d (diff)
downloadgcc-49bfcf43817fb7d36f168ef2ba992b652747e0b2.zip
gcc-49bfcf43817fb7d36f168ef2ba992b652747e0b2.tar.gz
gcc-49bfcf43817fb7d36f168ef2ba992b652747e0b2.tar.bz2
[multiple changes]
2011-08-03 Pascal Obry <obry@adacore.com> * makeutl.adb: Minor reformatting. 2011-08-03 Vincent Celier <celier@adacore.com> * fname-uf.adb (Get_File_Name) If the file cannot be found when there are no config pragmas file and May_Fail is True, return No_File instead of the file name, to be consistent. 2011-08-03 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_is_executable_file_attr): Avoid access to null pointer. 2011-08-03 Javier Miranda <miranda@adacore.com> * sem_ch13.adb (Same_Representation): In VM targets the representation of arrays with aliased components differs from arrays with non-aliased components. From-SVN: r177251
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog22
-rw-r--r--gcc/ada/adaint.c3
-rw-r--r--gcc/ada/fname-uf.adb11
-rw-r--r--gcc/ada/makeutl.adb26
-rw-r--r--gcc/ada/sem_ch13.adb13
5 files changed, 56 insertions, 19 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 587e390..180fd82 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,25 @@
+2011-08-03 Pascal Obry <obry@adacore.com>
+
+ * makeutl.adb: Minor reformatting.
+
+2011-08-03 Vincent Celier <celier@adacore.com>
+
+ * fname-uf.adb
+ (Get_File_Name) If the file cannot be found when there are no config
+ pragmas file and May_Fail is True, return No_File instead of the file
+ name, to be consistent.
+
+2011-08-03 Pascal Obry <obry@adacore.com>
+
+ * adaint.c (__gnat_is_executable_file_attr): Avoid access
+ to null pointer.
+
+2011-08-03 Javier Miranda <miranda@adacore.com>
+
+ * sem_ch13.adb
+ (Same_Representation): In VM targets the representation of arrays with
+ aliased components differs from arrays with non-aliased components.
+
2011-08-03 Emmanuel Briot <briot@adacore.com>
* prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 6845ff0..3d4c50a 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -2149,7 +2149,8 @@ __gnat_is_executable_file_attr (char* name, struct file_attributes* attr)
TCHAR *l, *last = _tcsstr(wname, _T(".exe"));
/* look for last .exe */
- while (l = _tcsstr(last+1, _T(".exe"))) last = l;
+ if (last)
+ while (l = _tcsstr(last+1, _T(".exe"))) last = l;
attr->executable = GetFileAttributes (wname) != INVALID_FILE_ATTRIBUTES
&& last - wname == (int) (_tcslen (wname) - 4);
diff --git a/gcc/ada/fname-uf.adb b/gcc/ada/fname-uf.adb
index 8f4e66f..1e550c1 100644
--- a/gcc/ada/fname-uf.adb
+++ b/gcc/ada/fname-uf.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -469,10 +469,15 @@ package body Fname.UF is
-- the default GNAT naming scheme. The file does
-- not exist, but there is no point doing the
-- second search, because we will end up with the
- -- same file name. Just return the file name.
+ -- same file name. Just return the file name, or No_File
+ -- if May_Fail is True.
elsif SFN_Patterns.Last = 2 then
- return Fnam;
+ if May_Fail then
+ return No_File;
+ else
+ return Fnam;
+ end if;
-- The file does not exist, but there may be other
-- naming scheme. Keep on searching.
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb
index 6127833..743ea6d 100644
--- a/gcc/ada/makeutl.adb
+++ b/gcc/ada/makeutl.adb
@@ -23,6 +23,12 @@
-- --
------------------------------------------------------------------------------
+with Ada.Command_Line; use Ada.Command_Line;
+
+with GNAT.Case_Util; use GNAT.Case_Util;
+with GNAT.Directory_Operations; use GNAT.Directory_Operations;
+with GNAT.HTable;
+
with ALI; use ALI;
with Debug;
with Fname;
@@ -36,12 +42,6 @@ with Snames; use Snames;
with Table;
with Tempdir;
-with Ada.Command_Line; use Ada.Command_Line;
-
-with GNAT.Case_Util; use GNAT.Case_Util;
-with GNAT.Directory_Operations; use GNAT.Directory_Operations;
-with GNAT.HTable;
-
package body Makeutl is
type Mark_Key is record
@@ -687,13 +687,13 @@ package body Makeutl is
Value : out Variable_Value;
Is_Default : out Boolean)
is
- Project : constant Project_Id :=
- Ultimate_Extending_Project_Of (Source_Prj);
- Pkg : constant Package_Id :=
- Prj.Util.Value_Of
- (Name => Pkg_Name,
- In_Packages => Project.Decl.Packages,
- In_Tree => Project_Tree);
+ Project : constant Project_Id :=
+ Ultimate_Extending_Project_Of (Source_Prj);
+ Pkg : constant Package_Id :=
+ Prj.Util.Value_Of
+ (Name => Pkg_Name,
+ In_Packages => Project.Decl.Packages,
+ In_Tree => Project_Tree);
begin
Is_Default := False;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 7d2e64c..8e240de 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -7292,7 +7292,16 @@ package body Sem_Ch13 is
and then Known_Component_Size (T2)
and then Component_Size (T1) = Component_Size (T2)
then
- return True;
+ if VM_Target = No_VM then
+ return True;
+
+ -- In VM targets the representation of arrays with aliased
+ -- components differs from arrays with non-aliased components
+
+ else
+ return Has_Aliased_Components (Base_Type (T1))
+ = Has_Aliased_Components (Base_Type (T2));
+ end if;
end if;
end if;