public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* function.c has unprotected call to FUNCTION_ARG_PASS_BY_REFERENCE
@ 2004-07-08  0:10 Alexandre Oliva
  2004-07-08  1:06 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Oliva @ 2004-07-08  0:10 UTC (permalink / raw)
  To: gcc-patches

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

... unlike the call presumably copied from calls.c.  Machines that
don't have FUNCTION_ARG_PASS_BY_REFERENCE lose.  This patch fixes it.
Installed as obviously correct.

Hmm...  Maybe it should be defined to 0 in defaults.h?  Ok to make
this additional change?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: function-arg-by-ref-if-defined.patch --]
[-- Type: text/x-patch, Size: 996 bytes --]

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* function.c (assign_parm_find_data_types): Call
	FUNCTION_ARG_PASS_BY_REFERENCE only if it's defined.

Index: gcc/function.c
===================================================================
RCS file: /cvs/uberbaum/gcc/function.c,v
retrieving revision 1.547
diff -u -p -r1.547 function.c
--- gcc/function.c 7 Jul 2004 18:40:02 -0000 1.547
+++ gcc/function.c 7 Jul 2004 22:59:37 -0000
@@ -2246,8 +2246,11 @@ assign_parm_find_data_types (struct assi
      the machine requires these objects be passed that way.  */
   if (CONTAINS_PLACEHOLDER_P (TYPE_SIZE (passed_type))
       || TREE_ADDRESSABLE (passed_type)
+#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
       || FUNCTION_ARG_PASS_BY_REFERENCE (all->args_so_far, passed_mode,
-					 passed_type, data->named_arg))
+					 passed_type, data->named_arg)
+#endif
+      )
     {
       passed_type = nominal_type = build_pointer_type (passed_type);
       data->passed_pointer = true;

[-- Attachment #3: Type: text/plain, Size: 188 bytes --]


-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-08 16:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-08  0:10 function.c has unprotected call to FUNCTION_ARG_PASS_BY_REFERENCE Alexandre Oliva
2004-07-08  1:06 ` Richard Henderson
2004-07-08  6:57   ` Alexandre Oliva
2004-07-08  7:17     ` Richard Henderson
2004-07-08 18:33       ` Alexandre Oliva

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