This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch implements the proper semantics of predicated subtypes in various contexts when the assertion policy is Ignore. This affects the semantics of case constructs and object declarations when values that do not satisfy the predicate are present. Tested in ACATS 4.0J tests C54003 and C457005 Tested on x86_64-pc-linux-gnu, committed on trunk 2016-05-02 Ed Schonberg <schonberg@adacore.com> * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate that predicate checking is disabled for predicated subtypes in the context of an Assertion_Policy pragma. * checks.adb (Apply_Predicate_Check): Do nothing if Predicates_Ignored is true. * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If Predicates_Ignores is true, the function Rep_To_Pos does raise an exception for invalid data. * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated type do not apply check if Predicates_Ignored is true. * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored is true, sem_prag.adb: * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored is true do not emit predicate check on initializing expression.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |