2018-05-21 Javier Miranda <miranda@adacore.com>
gcc/ada/
* sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
spec of a unit has Ada 2012 membership tests with multiple choices and
the unit body is not compiled under Ada 2012 mode.
From-SVN: r260464
+2018-04-04 Javier Miranda <miranda@adacore.com>
+
+ * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
+ spec of a unit has Ada 2012 membership tests with multiple choices and
+ the unit body is not compiled under Ada 2012 mode.
+
2018-04-04 Doug Rupp <rupp@adacore.com>
* sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
begin
Analyze_Expression (L);
- if No (R) and then Ada_Version >= Ada_2012 then
- Analyze_Set_Membership;
- Check_Function_Writable_Actuals (N);
+ if No (R) then
+ if Ada_Version >= Ada_2012 then
+ Analyze_Set_Membership;
+ Check_Function_Writable_Actuals (N);
+ else
+ Error_Msg_N
+ ("multiple choices in membership tests only allowed in Ada 2012",
+ N);
+ end if;
return;
end if;