public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Minor tweak to default_pass_by_ref
@ 2017-12-14 17:17 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2017-12-14 17:17 UTC (permalink / raw)
  To: gcc-patches

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

Tested on x86_64-suse-linux, applied on the mainline.


2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/misc.c (default_pass_by_ref): Minor tweak.

-- 
Eric Botcazou

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

Index: gcc-interface/misc.c
===================================================================
--- gcc-interface/misc.c	(revision 331642)
+++ gcc-interface/misc.c	(revision 331643)
@@ -1144,18 +1144,18 @@ default_pass_by_ref (tree gnu_type)
      is an In Out parameter, but it's probably best to err on the side of
      passing more things by reference.  */
 
-  if (pass_by_reference (NULL, TYPE_MODE (gnu_type), gnu_type, true))
-    return true;
-
-  if (targetm.calls.return_in_memory (gnu_type, NULL_TREE))
-    return true;
-
   if (AGGREGATE_TYPE_P (gnu_type)
       && (!valid_constant_size_p (TYPE_SIZE_UNIT (gnu_type))
 	  || 0 < compare_tree_int (TYPE_SIZE_UNIT (gnu_type),
 				   TYPE_ALIGN (gnu_type))))
     return true;
 
+  if (pass_by_reference (NULL, TYPE_MODE (gnu_type), gnu_type, true))
+    return true;
+
+  if (targetm.calls.return_in_memory (gnu_type, NULL_TREE))
+    return true;
+
   return false;
 }
 

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

only message in thread, other threads:[~2017-12-14 17:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 17:17 [Ada] Minor tweak to default_pass_by_ref Eric Botcazou

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