aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.cc
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2023-11-14 12:06:36 -0800
committerMarc Poulhiès <poulhies@adacore.com>2023-11-28 10:35:48 +0100
commit348cb1c0158fd4c54cd4176be97f5ab9bec3afb9 (patch)
treed843a0fff614aae84dda504d4b97bb5d3cfdb7eb /gcc/ada/gcc-interface/decl.cc
parent1a2f4e332c0bca0b6665921c38be9c9f1c04e0b4 (diff)
downloadgcc-348cb1c0158fd4c54cd4176be97f5ab9bec3afb9.zip
gcc-348cb1c0158fd4c54cd4176be97f5ab9bec3afb9.tar.gz
gcc-348cb1c0158fd4c54cd4176be97f5ab9bec3afb9.tar.bz2
ada: Error compiling reduction expression with overloaded reducer subprogram
In some cases involving a reduction expression with an overloaded reducer subprogram, the accumulator type is not determined correctly. This can lead to spurious compile-time errors. gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): In the case of a Reduce attribute reference, fix bugs in initializing Accum_Typ. The previous version was incorrect in the case where E1 refers to the first of multiple possible overload resolution candidates and that candidate does not turn out to be the right one. The previous version also had code to compute Accum_Typ via a different method if the initial computation turned out to yield a universal numeric type. Delete that initial computation and use the second method in all cases.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.cc')
0 files changed, 0 insertions, 0 deletions