diff options
author | Steve Baird <baird@adacore.com> | 2024-02-14 16:27:59 -0800 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-14 10:19:58 +0200 |
commit | 00c7f2296fbad17a54629f571da42104f1054478 (patch) | |
tree | 71f7a53182e1673073e9f21f6272a1a01e507111 /gcc/expr.cc | |
parent | f5798041ac97347e52d985be37f049c6d902d282 (diff) | |
download | gcc-00c7f2296fbad17a54629f571da42104f1054478.zip gcc-00c7f2296fbad17a54629f571da42104f1054478.tar.gz gcc-00c7f2296fbad17a54629f571da42104f1054478.tar.bz2 |
ada: Follow up fixes for Put_Image/streaming regressions
A recent change to reduce duplication of compiler-generated Put_Image and
streaming subprograms introduced two regressions. One is yet another of the
many cases where generating these routines "on demand" (as opposed at the
point of the associated type declaration) requires loosening the compiler's
enforcement of privacy. The other is a use-before-definition issue that
occurs because the declaration of a Put_Image procedure is not hoisted far
enough.
gcc/ada/
* exp_attr.adb (Build_And_Insert_Type_Attr_Subp): If a subprogram
associated with a (library-level) type declared in another unit is
to be inserted somewhere in a list, then insert it at the head of
the list.
* sem_ch5.adb (Analyze_Assignment): Normally a limited-type
assignment is illegal. Relax this rule if Comes_From_Source is
False and the type is not immutably limited.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions