ada: Operator visibility bug in static expression functions
In some cases, an expanded name refering to a predefined operator (such as
Some_Package."+") occurring in a static expression function would be
incorrectly rejected with a message saying that the operator is not directly
visible (which, while True, does not make the reference illegal).
gcc/ada/
* sem_ch4.adb (Is_Effectively_Visible_Opertor): Return True if
Checking_Potentially_Static_Expression is True. The accompanying
comment says True is returned "if there is a reason it is ok for
Is_Visible_Operator to return False"; if
Checking_Potentially_Static_Expression is true, that is such a
reason.