[Ada] Support chained calls to traversal functions in SPARK
This change only affects the SPARK toolset. In the part of semantic
analysis enforcing ownership rules for SPARK, it corrects a crash in
analysis of a declaration of a local borrower whose definition is a
chain of several calls to traversal functions.
2019-09-17 Claire Dross <dross@adacore.com>
gcc/ada/
* sem_spark.adb (Get_Observed_Or_Borrowed_Expr): If the
definition of a local borrower contains calls to traversal
functions, the borrowed expression is the first parameter of the
first traversal function call in the definition.