https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123580

--- Comment #2 from Eryndlia Mavourneen <efmavourneen at axioaction dot org> ---
(In reply to Eryndlia Mavourneen from comment #1)
> I am having a possibly related instantiation-phase compilation failure for
> the generic body of C (see example in the main bug report above): Calls to a
> procedure involving a type conversion (i.e., PT (Fields) where Fields is of
> derived type CT), and a call into P to modify PT trigger a 'subtype mark
> required in this context' error pointing to system.ads:1:01. The presence of
> the procedure body alone does not trigger it. Only when there is an actual
> call to it does the instantiation fail. Tested on GNAT 15.2.0 (Windows) with
> no post-15.2.0 available to me.

I was able to side-step the problem by switching the procedure's internal
workings to use the common ancestor type GPT.  The instantiation succeeds now.

Reply via email to