From 98f01d532a15a16c5d9afb0d35c9ea18688d2541 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 8 Dec 2004 12:27:00 +0100 Subject: exp_ch6.adb (Expand_Call): Add comment on handling of back end intrinsic * exp_ch6.adb (Expand_Call): Add comment on handling of back end intrinsic * exp_intr.adb (Expand_Intrinsic_Call): Ignore unrecognized intrinsic, leaving call unchanged. This deals with the case where the pragma Import specified an external name, to be handled by the back end. * sem_prag.adb (Process_Import_Or_Interface): Do not check validity of subprogram which is Imported with convention Intrinsic if an External_Name argument is specified. (Process_Import_Or_Interface): Properly diagnose link name argument. (Inlining_Not_Possible): New name for Cannot_Inline, to avoid confusion with Sem_Ch6.Cannot_Inline. (Process_Inline): Provide separate warning for inapplicable inline pragma. (Cannot_Inline): Reject subprograms that have an at_end handler, so that treatment is uniform on different targets. From-SVN: r91882 --- gcc/ada/exp_intr.adb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'gcc/ada/exp_intr.adb') diff --git a/gcc/ada/exp_intr.adb b/gcc/ada/exp_intr.adb index 7f99eb5..8f41704 100644 --- a/gcc/ada/exp_intr.adb +++ b/gcc/ada/exp_intr.adb @@ -281,12 +281,21 @@ package body Exp_Intr is then Expand_Source_Info (N, Nam); - else - -- Only other possibility is a renaming, in which case we expand - -- the call to the original operation (which must be intrinsic). + -- If we have a renaming, expand the call to the original operation, + -- which must itself be intrinsic, since renaming requires matching + -- conventions and this has already been checked. - pragma Assert (Present (Alias (E))); + elsif Present (Alias (E)) then Expand_Intrinsic_Call (N, Alias (E)); + + -- The only other case is where an external name was specified, + -- since this is the only way that an otherwise unrecognized + -- name could escape the checking in Sem_Prag. Nothing needs + -- to be done in such a case, since we pass such a call to the + -- back end unchanged. + + else + null; end if; end Expand_Intrinsic_Call; -- cgit v1.1