gcc/ada/
* exp_ch6.adb (Expand_Branch): Verify the original node is a
conditional expression before recursing further.
(Insert_Level_Assign): Transform assertion into an explicit
raise.
if Nkind (Expression (Assn)) =
N_Expression_With_Actions
+ and then
+ Nkind_In
+ (Original_Node (Expression (Assn)),
+ N_Case_Expression,
+ N_If_Expression)
then
Insert_Level_Assign (Expression (Assn));
N_If_Statement);
Next (Cond);
- pragma Assert (Present (Cond));
+
+ if No (Cond) then
+ raise Program_Error;
+ end if;
end loop;
-- Iterate through if expression branches