aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_attr.adb
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2008-07-31 12:27:04 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-07-31 12:27:04 +0200
commitb2c6b35f24ba203e027caa8e5206810d3d6ae265 (patch)
tree7a1b90c5a983af5483ae958b4c0e2a7e98b51891 /gcc/ada/exp_attr.adb
parenta66495761c21febaa3b0f4d1ac22f5e3d414244b (diff)
downloadgcc-b2c6b35f24ba203e027caa8e5206810d3d6ae265.zip
gcc-b2c6b35f24ba203e027caa8e5206810d3d6ae265.tar.gz
gcc-b2c6b35f24ba203e027caa8e5206810d3d6ae265.tar.bz2
exp_attr.adb (Find_Stream_Subprogram): Check the base type instead of the type when...
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. From-SVN: r138383
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 1637863..006b8f8 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);