]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Dec 2017 17:17:03 +0000 (17:17 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Dec 2017 17:17:03 +0000 (17:17 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255650 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/misc.c

index 350ac1f8d2555201b7803e596106a08070c3a256..6a194bb4bd3116352bf6341d761e86babb684e17 100644 (file)
@@ -1,3 +1,7 @@
+2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
+
 2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
index 9a4a48fba42f5f68eb0c39c629fb4f7189e7c598..c45be734c32ac87a9beae069b6d728fec97b56f0 100644 (file)
@@ -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;
 }