aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/errno.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-11 08:02:35 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-11 08:02:35 +0000
commit6ef13c4ff90e51d13162fd8328d873ae03e6b2b4 (patch)
tree33d3ab5a650516467f4c7d02b8bde04513d0c8cd /gcc/ada/errno.c
parent220dc4b2825745db538915298d0c79f2f12ce5e0 (diff)
downloadgcc-6ef13c4ff90e51d13162fd8328d873ae03e6b2b4.zip
gcc-6ef13c4ff90e51d13162fd8328d873ae03e6b2b4.tar.gz
gcc-6ef13c4ff90e51d13162fd8328d873ae03e6b2b4.tar.bz2
[Ada] Remove redundant predicate checks
This patch removes redundant dynamic predicate checks generated by type conversions in various contexts. The patch also recognizes additional such checks that can be evaluated statically when applied to constant values. No simple test available. 2019-07-11 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_ch4.adb (Expand_N_Type_Conversion): If a predicate check is generated, analyze it with range check suppressed, because that check has been previously applied. * exp_ch5.adb (Expand_N_Assignment_Statement): If the RHS is a type conversion to the type of the LHS, do not apply a predicate check to the RHS because it will have been generated already during its expansion. * exp_ch6.adb (Can_Fold_Predicate_Call): Extend processing to handle a predicate check on a constant entity whose value is static. From-SVN: r273395
Diffstat (limited to 'gcc/ada/errno.c')
0 files changed, 0 insertions, 0 deletions