On 05/29/2017 09:50 AM, Pierre-Marie de Rodat wrote:
Bootstrapped and reg-tested on x86_64-linux.  Ok to commit? Thank you in
advance!

I just realized that I forgot to add the testcase: here it is, sorry!

--
Pierre-Marie de Rodat
--  { dg-options "-cargs -g -dA -margs" }
--  { dg-final { scan-assembler "local_imported_func" } }
--  { dg-final { scan-assembler "local_imported_var" } }
--  { dg-final { scan-assembler "global_imported_func" } }
--  { dg-final { scan-assembler "global_imported_var" } }
--  { dg-final { scan-assembler-not "foreign_imported_func" } }
--  { dg-final { scan-assembler-not "foreign_imported_var" } }

with Debug11_Pkg2;

package body Debug11_Pkg is

   procedure Dummy is
      Local_Imported_Var : Integer;
      pragma Import (C, Local_Imported_Var, "imported_var");

      function Local_Imported_Func return Integer;
      pragma Import (C, Local_Imported_Func, "imported_func");
   begin
      Local_Imported_Var := Local_Imported_Func;
      Global_Imported_Var := Global_Imported_Func;
      Debug11_Pkg2.Foreign_Imported_Var :=
         Debug11_Pkg2.Foreign_Imported_Func;
   end Dummy;

end Debug11_Pkg;
package Debug11_Pkg is

   Global_Imported_Var : Integer;
   pragma Import (C, Global_Imported_Var, "imported_var");

   function Global_Imported_Func return Integer;
   pragma Import (C, Global_Imported_Func, "imported_func");

   procedure Dummy;

end Debug11_Pkg;
package Debug11_Pkg2 is

   Foreign_Imported_Var : Integer;
   pragma Import (C, Foreign_Imported_Var, "imported_var");

   function Foreign_Imported_Func return Integer;
   pragma Import (C, Foreign_Imported_Func, "imported_func");

end Debug11_Pkg2;

Reply via email to