An assignment statement whose LHS is of a reference type is never legal. If
no other legality rule is violated, then it is ambiguous. In some cases this
ambiguity was not correctly detected.
gcc/ada/
* sem_ch5.adb (Analyze_Assignment): Delete code that was
incorrectly implementing a preference rule.
then
null;
- -- This may be a call to a parameterless function through an
- -- implicit dereference, so discard interpretation as well.
-
- elsif Is_Entity_Name (Lhs)
- and then Has_Implicit_Dereference (It.Typ)
- then
- null;
-
elsif Has_Compatible_Type (Rhs, It.Typ) then
if T1 = Any_Type then
T1 := It.Typ;