aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/ali-util.adb
diff options
context:
space:
mode:
authorMarc Poulhiès <poulhies@adacore.com>2022-06-17 16:07:35 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2022-07-12 12:24:10 +0000
commit1ef1ac768ff108a6a2c08e18eec3309e182df142 (patch)
tree6320c0b697e8e6e537e34059d30f665686e3226d /gcc/ada/ali-util.adb
parent829b5a6075e63e84600b0eee5daebb3fab9aa491 (diff)
downloadgcc-1ef1ac768ff108a6a2c08e18eec3309e182df142.zip
gcc-1ef1ac768ff108a6a2c08e18eec3309e182df142.tar.gz
gcc-1ef1ac768ff108a6a2c08e18eec3309e182df142.tar.bz2
[Ada] Fix missing Overflow and Range checks
While doing Preanalysis (as is the case during ghost code handling), some range and/or overflow checks can be saved (see Saved_Checks in checks.adb) and later one omitted as they would be redundant (see Find_Check in checks.adb). In the case of ghost code, the node being Preanalyzed is a temporary copy that is discarded, so its corresponding check is not expanded later. The node that gets expanded later is not having any checks expanded as it is wrongly assumed it has already been done before. As is already the case in Preanalyze_And_Resolve, this change suppresses all checks during Preanalyze except for GNATprove mode. gcc/ada/ * sem.adb (Preanalyze): Suppress checks when not in GNATprove mode. * sem_res.adb (Preanalyze_And_Resolve): Add cross reference in comment to above procedure. * sinfo.ads: Typo fix in comment.
Diffstat (limited to 'gcc/ada/ali-util.adb')
0 files changed, 0 insertions, 0 deletions