public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <botcazou@adacore.com>
To: Ramana Radhakrishnan <ramana.gcc@googlemail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] ARM: Make ARMv8-M attribute cmse_nonsecure_call work in Ada
Date: Mon, 21 Nov 2022 09:51:08 +0100	[thread overview]
Message-ID: <2656741.mvXUDI8C0e@fomalhaut> (raw)
In-Reply-To: <CAJA7tRZkQEvRhmjT-kCF-W3a15zm-Oa276Si8J8Bqq2ZrjR9AA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

> 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

[-- Attachment #2: machine_attr2.ads --]
[-- Type: text/x-adasrc, Size: 188 bytes --]

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;

[-- Attachment #3: machine_attr2.adb --]
[-- Type: text/x-adasrc, Size: 354 bytes --]

-- { 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	other threads:[~2022-11-21  8:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  8:54 Eric Botcazou
2022-11-17 21:02 ` Ramana Radhakrishnan
2022-11-21  8:51   ` Eric Botcazou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2656741.mvXUDI8C0e@fomalhaut \
    --to=botcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ramana.gcc@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).