summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_attr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-13 10:09:44 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-13 10:09:44 +0000
commitad7d90bc6615e53cfb81966476cd4d0079473822 (patch)
treec9d79f22ee854da91dc4e89b60991b31a39362fa /gcc/ada/exp_attr.adb
parent85e117689468a35102b82009c9c3d0fd49c13cc5 (diff)
downloadgcc-ad7d90bc6615e53cfb81966476cd4d0079473822.tar.gz
2009-07-13 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Rewrite_Stream_Proc_Call): When rewriting a stream attribute into a call of the corresponding suprogram, create extra formals for the subprogram, because it may be a renaming whose analysis does not create extra formals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149564 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_attr.adb')
-rw-r--r--gcc/ada/exp_attr.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index c22598582ca..2df553c4585 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -593,6 +593,14 @@ package body Exp_Attr is
end if;
end if;
+ -- The stream operation to call maybe a renaming created by
+ -- an attribute definition clause, and may not be frozen yet.
+ -- Ensure that it has the necessary extra formals.
+
+ if not Is_Frozen (Pname) then
+ Create_Extra_Formals (Pname);
+ end if;
+
-- And now rewrite the call
Rewrite (N,