public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Remove obsolete DSP comment
@ 2020-10-15  9:40 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-10-15  9:40 UTC (permalink / raw)
  To: gcc-patches; +Cc: Bob Duff

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

Remove a reference to the "depressed stack pointer" method of doing
returns of caller-unknown-size subtypes. DSP was removed from the
compiler years ago.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* exp_ch6.adb (Expand_Simple_Function_Return): Remove DSP part
	of comment, and reformat.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 1609 bytes --]

diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -7556,15 +7556,14 @@ package body Exp_Ch6 is
          Set_Enclosing_Sec_Stack_Return (N);
 
          --  Optimize the case where the result is a function call. In this
-         --  case either the result is already on the secondary stack, or is
-         --  already being returned with the stack pointer depressed and no
-         --  further processing is required except to set the By_Ref flag
-         --  to ensure that gigi does not attempt an extra unnecessary copy.
-         --  (actually not just unnecessary but harmfully wrong in the case
-         --  of a controlled type, where gigi does not know how to do a copy).
-         --  To make up for a gcc 2.8.1 deficiency (???), we perform the copy
-         --  for array types if the constrained status of the target type is
-         --  different from that of the expression.
+         --  case the result is already on the secondary stack and no further
+         --  processing is required except to set the By_Ref flag to ensure
+         --  that gigi does not attempt an extra unnecessary copy. (Actually
+         --  not just unnecessary but wrong in the case of a controlled type,
+         --  where gigi does not know how to do a copy.) To make up for a gcc
+         --  2.8.1 deficiency (???), we perform the copy for array types if the
+         --  constrained status of the target type is different from that of
+         --  the expression.
 
          if Requires_Transient_Scope (Exp_Typ)
            and then



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-15  9:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  9:40 [Ada] Remove obsolete DSP comment Pierre-Marie de Rodat

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).