[Ada] Spurious error on qualified prefix in Pack.Func'Result
commit1f85342b42b4bf9fee3cd23bc38498a3565bc9f1
authorYannick Moy <moy@adacore.com>
Mon, 23 May 2022 12:27:41 +0000 (23 14:27 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 5 Jul 2022 08:28:18 +0000 (5 08:28 +0000)
tree6cf1c37dbb540331c713b60083ad5f0684056759
parent69a70b0acbf01387ec1d1e85d2c7ed0d588d799e
[Ada] Spurious error on qualified prefix in Pack.Func'Result

When using a qualified name such as Pack.Func as the prefix of a 'Result
attribute reference, the prefix is not fully resolved and may contain a
chain of homonyms. Look for the expected function in the homonym chain
instead of issuing an error if the first one is not the expected one.

gcc/ada/

* sem_attr.adb (Analyze_Attribute): Take into account the
possibility of homonyms.
gcc/ada/sem_attr.adb