[Ada] Fix spurious error on derived private type with predicate
Pierre-Marie de Rodat
derodat@adacore.com
Tue Jun 16 13:07:46 GMT 2020
As explained in the head comment of Compatible_Types_In_Predicate,
anomalies involving private and full views can occur when a call
to a predicate or invariant function is generated by the compiler.
The function uses the child function Common_Type to reconcile the
various views of a private type, but this latter function does not
consider the Underlying_Full_View of private types, so it can miss
some cases like this one.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* sem_ch4.adb (Common_Type): Go to Underlying_Full_View, if any.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1338 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200616/23901391/attachment.bin>
More information about the Gcc-patches
mailing list