diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2013-10-14 13:21:37 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-14 15:21:37 +0200 |
commit | 26168a32da1ef7e75c8f2f6b557d8ecce17e43b9 (patch) | |
tree | 3e117de369c2a81a5692e2a6a127fb2fd3af486e /gcc/ada | |
parent | c852a0a90d26061bc21d79b9441e9c3e2ac70536 (diff) | |
download | gcc-26168a32da1ef7e75c8f2f6b557d8ecce17e43b9.zip gcc-26168a32da1ef7e75c8f2f6b557d8ecce17e43b9.tar.gz gcc-26168a32da1ef7e75c8f2f6b557d8ecce17e43b9.tar.bz2 |
sem_prag.adb (Check_Mode): Do not emit an error when inspecting a self referencial output item of an...
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_Mode): Do not emit an
error when inspecting a self referencial output item of an
unconstrained type.
From-SVN: r203545
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index dcad0df..5462077 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2013-10-14 Hristian Kirtchev <kirtchev@adacore.com> + + * sem_prag.adb (Check_Mode): Do not emit an + error when inspecting a self referencial output item of an + unconstrained type. + 2013-10-14 Tristan Gingold <gingold@adacore.com> * exp_prag.adb (Expand_Pragma_Import_Export_Exception): Fix diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 21e47659..fc263c2 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -928,6 +928,15 @@ package body Sem_Prag is Error_Msg_NE ("item & must have mode in out", Item, Item_Id); end if; + -- A self-referential out parameter of an unconstrained or tagged + -- type acts as an input because the discriminants, array bounds + -- or the tag may be read. + + elsif Ekind (Item_Id) = E_Out_Parameter + and then Is_Unconstrained_Or_Tagged_Item (Item_Id) + then + null; + -- Self-referential parameter elsif Ekind (Item_Id) /= E_In_Out_Parameter then |