[Ada] Crash on use of 'Img on record type in expression
authorEd Schonberg <schonberg@adacore.com>
Mon, 10 May 2021 13:40:22 +0000 (09:40 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 6 Jul 2021 14:46:55 +0000 (14:46 +0000)
commit3a7961c89914cf544018e731693418f18b5cc984
treef21ed754905cbdc28fba42d7965834c62077b663
parentcb338455b39c13cc2385b653dc9bb89edca24b62
[Ada] Crash on use of 'Img on record type in expression

gcc/ada/

* exp_ch4.adb (Process_Transient_In_Expression): Ensure that
Fin_Context, used to insert finalization code for the
expression, is a list member: the value returned by
Find_Hook_Context may be an expression node when the transient
is part of a larger expression and it has a non-boolean type.
gcc/ada/exp_ch4.adb