diff options
author | Bob Duff <duff@adacore.com> | 2021-07-05 18:01:22 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-21 15:24:59 +0000 |
commit | b12d18a82597b97cbaccbac4253e8837f339d9a0 (patch) | |
tree | 0ebb150fd5c953a4fc9dd1c8baa9d6a4d13a5027 /gcc/gimple-range-cache.cc | |
parent | 97a5ed2071fffe85ee1a07e0655740162e4cce64 (diff) | |
download | gcc-b12d18a82597b97cbaccbac4253e8837f339d9a0.zip gcc-b12d18a82597b97cbaccbac4253e8837f339d9a0.tar.gz gcc-b12d18a82597b97cbaccbac4253e8837f339d9a0.tar.bz2 |
[Ada] Add assertions to Uintp
gcc/ada/
* uintp.ads, uintp.adb: Add assertions.
(Ubool, Opt_Ubool): New "boolean" subtypes.
(UI_Is_In_Int_Range): The parameter should probably be
Valid_Uint, but we don't change that for now, because it causes
failures in gigi.
* sem_util.ads, sem_util.adb (Is_True, Is_False,
Static_Boolean): Use Opt_Ubool subtype. Document the fact that
Is_True (No_Uint) = True. Implement Is_False in terms of
Is_True. We considered changing Static_Boolean to return Uint_1
in case of error, but that doesn't fit in well with
Static_Integer.
(Has_Compatible_Alignment_Internal): Deal with cases where Offs
is No_Uint. Change one "and" to "and then" to ensure we don't
pass No_Uint to ">", which would violate the new assertions.
* exp_util.adb, freeze.adb, sem_ch13.adb: Avoid violating new
assertions in Uintp.
Diffstat (limited to 'gcc/gimple-range-cache.cc')
0 files changed, 0 insertions, 0 deletions