Fix assertion failure in developer builds which happened when the THEN
expression contains an illegal occurrence of 'Old and the type of the
THEN expression is left as Any_Type, but there is no ELSE expression.
gcc/ada/
* sem_ch4.adb (Analyze_If_Expression): Add guard for
if_expression without an ELSE part.
("\ELSE expression has}!", Else_Expr, Etype (Else_Expr));
end if;
- else
+ elsif Present (Else_Expr) then
if Is_Overloaded (Else_Expr) then
Error_Msg_N
("no interpretation compatible with type of THEN expression",