> Ok if no regressions, perhaps the test needs to be in the ada test suite ?

Thanks.  Sure, testcase added to gnat.dg like so:

        * gnat.dg/machine_attr2.ads, gnat.dg/machine_attr2.adb: New test.

-- 
Eric Botcazou
package Machine_Attr2 is

  type Non_Secure is access procedure;
  pragma Machine_Attribute (Non_Secure, "cmse_nonsecure_call");

  procedure Call (Proc : Non_Secure);

end Machine_Attr2;
-- { dg-do compile { target arm*-*-* } }
-- { dg-options "-mcpu=cortex-m33 -mcmse" }

package body Machine_Attr2 is
  
  procedure Call (Proc : Non_Secure) is
  begin
    Proc.all;
  end;

  procedure Foo; -- { dg-warning "only applies to base type" }
  pragma Machine_Attribute (Foo, "cmse_nonsecure_call");
  procedure Foo is null;

end Machine_Attr2;

Reply via email to