From: Arnaud Charlet Date: Wed, 28 Oct 2009 14:14:05 +0000 (+0100) Subject: [multiple changes] X-Git-Tag: releases/gcc-4.5.0~2651 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=66a63e0d327753984f05353b4cf68e0f734311fc;p=gcc.git [multiple changes] 2009-10-28 Thomas Quinot * s-crtl.ads (System.CRTL.strerror): New function. 2009-10-28 Ed Schonberg * sem_type.adb: Add guard to recover some type errors. From-SVN: r153662 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cb88c2b51bf4..36f7715d1acc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2009-10-28 Thomas Quinot + + * s-crtl.ads (System.CRTL.strerror): New function. + +2009-10-28 Ed Schonberg + + * sem_type.adb: Add guard to recover some type errors. + 2009-10-28 Vincent Celier * 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 5a9902dd6570..f013a418fcba 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 6f3e36935fb0..5b3a4f3ecfeb 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