[Ada] Spurious error on private extension with predicate
This patch fixes a spurious error involving a private extension whose
full view includes a dynamic predicate, when the parent type is itself
private at the point of the predicate check. The conversion is known to
be legal so no extra conversion checks are required.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* exp_util.adb (Make_Predicate_Call): Use OK_Convert_To when
applying a predicate check to prevent spurious errors when
private ancestors are involved.
gcc/testsuite/
* gnat.dg/predicate2-containers.ads,
gnat.dg/predicate2-project-name_values.ads,
gnat.dg/predicate2-project-registry-attribute.ads,
gnat.dg/predicate2-project-registry.ads,
gnat.dg/predicate2-project-typ-set.ads,
gnat.dg/predicate2-project-typ.ads,
gnat.dg/predicate2-project.ads,
gnat.dg/predicate2-source_reference.ads, gnat.dg/predicate2.ads,
gnat.dg/predicate2_main.adb: New testcase.
From-SVN: r264626
13 files changed: