Skip to content
Snippets Groups Projects
Commit 7f569491 authored by Steve Baird's avatar Steve Baird Committed by Eric Botcazou
Browse files

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.
parent 751a3ca8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment