]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Allow uses of range utility routines on private types
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2018 08:56:07 +0000 (08:56 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2018 08:56:07 +0000 (08:56 +0000)
commit68a76a293bc390a2b76643257ccf2680cf5bb25a
treef4ba25915623884bc147bc5501680703099e5650
parentb0d43bae94e79323914175715ada40275297307c
[Ada] Allow uses of range utility routines on private types

Frontend only calls Is_Null_Range and Not_Null_Range routines on full views
of types, but backends (for example GNATprove) might call them also on
private types. This patch adapts those routines to transparently retrieve
the full type when called on a private type.

No frontend test, because only external backends are affected.

2018-01-11  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
private (sub)type; refactor to avoid early return statement.
(Not_Null_Range): Same as above.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256522 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/sem_eval.adb