diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-10-28 15:14:05 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-10-28 15:14:05 +0100 |
commit | 66a63e0d327753984f05353b4cf68e0f734311fc (patch) | |
tree | a4e495ccbee929656dde1383860ee5c92ed95ea4 | |
parent | fc475a082ce2d06a0e458438236b01f8e221772e (diff) | |
download | gcc-66a63e0d327753984f05353b4cf68e0f734311fc.zip gcc-66a63e0d327753984f05353b4cf68e0f734311fc.tar.gz gcc-66a63e0d327753984f05353b4cf68e0f734311fc.tar.bz2 |
[multiple changes]
2009-10-28 Thomas Quinot <quinot@adacore.com>
* s-crtl.ads (System.CRTL.strerror): New function.
2009-10-28 Ed Schonberg <schonberg@adacore.com>
* sem_type.adb: Add guard to recover some type errors.
From-SVN: r153662
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/s-crtl.ads | 3 | ||||
-rw-r--r-- | gcc/ada/sem_type.adb | 10 |
3 files changed, 19 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cb88c2b..36f7715 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2009-10-28 Thomas Quinot <quinot@adacore.com> + + * s-crtl.ads (System.CRTL.strerror): New function. + +2009-10-28 Ed Schonberg <schonberg@adacore.com> + + * sem_type.adb: Add guard to recover some type errors. + 2009-10-28 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Add_To_Or_Remove_From_List): New name of procedure diff --git a/gcc/ada/s-crtl.ads b/gcc/ada/s-crtl.ads index 5a9902d..f013a41 100644 --- a/gcc/ada/s-crtl.ads +++ b/gcc/ada/s-crtl.ads @@ -202,4 +202,7 @@ package System.CRTL is function write (fd : int; buffer : chars; nbytes : int) return int; pragma Import (C, write, "write"); + function strerror (errno : int) return chars; + pragma Import (C, strerror, "strerror"); + end System.CRTL; diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index 6f3e369..5b3a4f3 100644 --- a/gcc/ada/sem_type.adb +++ b/gcc/ada/sem_type.adb @@ -970,10 +970,16 @@ package body Sem_Type is then return Covers (Corresponding_Remote_Type (T2), T1); - elsif Is_Record_Type (T1) and then Is_Concurrent_Type (T2) then + elsif Is_Record_Type (T1) + and then Is_Concurrent_Type (T2) + and then Present (Corresponding_Record_Type (T2)) + then return Covers (T1, Corresponding_Record_Type (T2)); - elsif Is_Concurrent_Type (T1) and then Is_Record_Type (T2) then + elsif Is_Concurrent_Type (T1) + and then Present (Corresponding_Record_Type (T1)) + and then Is_Record_Type (T2) + then return Covers (Corresponding_Record_Type (T1), T2); elsif Ekind (T2) = E_Access_Attribute_Type |