diff options
author | Ed Schonberg <schonberg@adacore.com> | 2009-07-13 10:09:44 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-13 12:09:44 +0200 |
commit | 99269cf58648ce57df8dd0c3660122252e7198db (patch) | |
tree | c9d79f22ee854da91dc4e89b60991b31a39362fa /gcc/ada | |
parent | 32404665670241aa41589352c2fb9805f5aac4c6 (diff) | |
download | gcc-99269cf58648ce57df8dd0c3660122252e7198db.zip gcc-99269cf58648ce57df8dd0c3660122252e7198db.tar.gz gcc-99269cf58648ce57df8dd0c3660122252e7198db.tar.bz2 |
exp_attr.adb (Rewrite_Stream_Proc_Call): When rewriting a stream attribute into a call of the corresponding suprogram...
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.
From-SVN: r149564
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/exp_attr.adb | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 46f59b8..03680cca 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +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. + 2009-07-13 Emmanuel Briot <briot@adacore.com> * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb, diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index c225985..2df553c 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, |