summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_attr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-31 10:27:04 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-31 10:27:04 +0000
commit8667b0b2357d15dc50af1025a72559a51c043243 (patch)
tree7a1b90c5a983af5483ae958b4c0e2a7e98b51891 /gcc/ada/exp_attr.adb
parente6bfb401a124d4863a86a6300db4e5038e52b4ad (diff)
downloadgcc-8667b0b2357d15dc50af1025a72559a51c043243.tar.gz
2008-07-31 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb (Find_Stream_Subprogram): Check the base type instead of the type when looking for stream subprograms for type String, Wide_String and Wide_Wide_String. * s-ststop.adb: Change the initialization expression of constant Use_Block_IO. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138383 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_attr.adb')
-rw-r--r--gcc/ada/exp_attr.adb9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index 1637863cf45..006b8f8c53c 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -5314,7 +5314,8 @@ package body Exp_Attr is
(Typ : Entity_Id;
Nam : TSS_Name_Type) return Entity_Id
is
- Ent : constant Entity_Id := TSS (Typ, Nam);
+ Base_Typ : constant Entity_Id := Base_Type (Typ);
+ Ent : constant Entity_Id := TSS (Typ, Nam);
begin
if Present (Ent) then
@@ -5340,7 +5341,7 @@ package body Exp_Attr is
-- String as defined in package Ada
- if Typ = Standard_String then
+ if Base_Typ = Standard_String then
if Nam = TSS_Stream_Input then
return RTE (RE_String_Input);
@@ -5356,7 +5357,7 @@ package body Exp_Attr is
-- Wide_String as defined in package Ada
- elsif Typ = Standard_Wide_String then
+ elsif Base_Typ = Standard_Wide_String then
if Nam = TSS_Stream_Input then
return RTE (RE_Wide_String_Input);
@@ -5372,7 +5373,7 @@ package body Exp_Attr is
-- Wide_Wide_String as defined in package Ada
- elsif Typ = Standard_Wide_Wide_String then
+ elsif Base_Typ = Standard_Wide_Wide_String then
if Nam = TSS_Stream_Input then
return RTE (RE_Wide_Wide_String_Input);