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: "simon at pushface dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Jan 2016 12:40:05 +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
simon at pushface dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simon at pushface dot org
--- Comment #7 from simon at pushface dot org ---
As far as I can see 5.1.0 (and 5.2.0) are happy that the trampolines should be
*generated* in the presence of pragma Restrictions (No_Implicit_Dynamic_Code);
trampoline.adb compiles and builds without problem.
The problem arises when the trampolines are invoked;
with Ada.Containers.Vectors;
procedure Trampoline is
package Vectors is new Ada.Containers.Vectors (Positive, Integer);
type Capacity_P is
access function (Container : Vectors.Vector)
return Ada.Containers.Count_Type;
P : Capacity_P;
begin
P := Vectors.Capacity'Access;
end Trampoline;
results in the expected 'violation of restriction âNo_Implicit_Dynamic_Codeââ
error at compile time.