aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/usage.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-01-26 15:59:37 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-16 10:30:59 +0200
commit9a70dce278846340ca1a7adc3e5eb9a3b0012d8b (patch)
tree8b6f23030c54e0316132ff246c0bc410c8e5fa7d /gcc/ada/usage.adb
parente07e6ea6924e594b337ebf9cb175bc6b8e213923 (diff)
downloadgcc-9a70dce278846340ca1a7adc3e5eb9a3b0012d8b.zip
gcc-9a70dce278846340ca1a7adc3e5eb9a3b0012d8b.tar.gz
gcc-9a70dce278846340ca1a7adc3e5eb9a3b0012d8b.tar.bz2
ada: Use accumulator type in expansion of 'Reduce attribute
The current expansion of the 'Reduce attribute uses the resolution type of the expression for the accumulator. Now this type can be unresolved or set to a universal type, for example if it is itself the prefix of the 'Image attribute, and this may yield a spurious type mismatch error in that case. This changes the expansion to use the accumulator type instead as defined by the RM 4.5.10 clause, albeit only in the prefixed case for now. gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Reduce>: Use the canonical accumulator type as the type of the accumulator in the prefixed case.
Diffstat (limited to 'gcc/ada/usage.adb')
0 files changed, 0 insertions, 0 deletions