This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/67205] violation of No_Implicit_Dynamic_Code restriction not reported


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]