[Ada] Crash on expression functions within quantified expressions
authorJustin Squirek <squirek@adacore.com>
Wed, 26 Sep 2018 09:17:21 +0000 (09:17 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 26 Sep 2018 09:17:21 +0000 (09:17 +0000)
commitb45a9ff305f536031a12509c6c6e7aea9cb7f884
treee50986c734e96e988f0412ebc25891b9b39455e6
parentbcbe14db192f03018ea74cf6eb24c04a110ecac0
[Ada] Crash on expression functions within quantified expressions

This patch fixes an issue whereby using a call to an expression function
as the domain of iteration for a loop would trigger a crash due to the
function not being frozen appropriately.

2018-09-26  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* sem_ch5.adb (Analyze_Iterator_Specification): Add conditional
to freeze called functions within iterator specifications during
full analysis.
(Preanalyze_Range): Minor typo fix.

gcc/testsuite/

* gnat.dg/expr_func8.adb: New testcase.

From-SVN: r264612
gcc/ada/ChangeLog
gcc/ada/sem_ch5.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/expr_func8.adb [new file with mode: 0644]