This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/67205] violation of No_Implicit_Dynamic_Code restriction not reported
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Sep 2015 11:28:12 +0000
- Subject: [Bug ada/67205] violation of No_Implicit_Dynamic_Code restriction not reported
- Auto-submitted: auto-generated
- References: <bug-67205-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67205
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Couldn't you put the static chain for the dispatching subprograms into the
> vtable of the tagged type?
Presumably not, the vtable layout is constrained by the C++ compatibility and
this extends to local tagged types since Ada 2005. In any case, see below.
> In some examples (including this one, and those I recently submitted as a
> GNAT tools patch), it seems rather straightforward to float the generic
> instantiation out of the nested subprogram. Some care is necessary to make
> sure the transformation is in fact valid, but I had hoped this would be a
> more localized change in the compiler.
The truth is, the versions of GNAT released by AdaCore use a general scheme to
eliminate (almost) all trampolines, at least on native platforms, so there is
no incentive for small tricks like this. We could submit the scheme if there
is some interest from the community.