public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libffi/29181]  New: libffi/src/powerpc/ffi_darwin.c not 64-bit clean
@ 2006-09-22 13:38 howarth at nitro dot med dot uc dot edu
  2006-09-22 14:28 ` [Bug libffi/29181] " howarth at nitro dot med dot uc dot edu
  2006-09-22 16:51 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2006-09-22 13:38 UTC (permalink / raw)
  To: gcc-bugs

When compiled at -m64 on Darwin PPC, we get the warning...

../../../../gcc-4.2-20060915/libffi/src/powerpc/ffi_darwin.c: In function
'ffi_prep_args':
../../../../gcc-4.2-20060915/libffi/src/powerpc/ffi_darwin.c:117: warning: cast
from pointer to integer of different size

for the line...

    *next_arg++ = (unsigned)(char *)ecif->rvalue;

It would appear that we should be doing the same thing as in libffi.c...

===================================================================
--- ffi_darwin.c        (revision 117142)
+++ ffi_darwin.c        (working copy)
@@ -114,7 +114,7 @@
      Return values are referenced by r3, so r4 is the first parameter.  */

   if (flags & FLAG_RETVAL_REFERENCE)
-    *next_arg++ = (unsigned)(char *)ecif->rvalue;
+    *next_arg++ = (unsigned long)(char *)ecif->rvalue;

   /* Now for the arguments.  */
   for (;

I will be testing this fix tonight and seeing if it improves the current
level of failures for the libffi testsuite at -m64 on Darwin PPC.


-- 
           Summary: libffi/src/powerpc/ffi_darwin.c not 64-bit clean
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libffi
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: howarth at nitro dot med dot uc dot edu
 GCC build triplet: powerpc-apple-darwin8
  GCC host triplet: powerpc-apple-darwin8
GCC target triplet: powerpc-apple-darwin8


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29181


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

* [Bug libffi/29181] libffi/src/powerpc/ffi_darwin.c not 64-bit clean
  2006-09-22 13:38 [Bug libffi/29181] New: libffi/src/powerpc/ffi_darwin.c not 64-bit clean howarth at nitro dot med dot uc dot edu
@ 2006-09-22 14:28 ` howarth at nitro dot med dot uc dot edu
  2006-09-22 16:51 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2006-09-22 14:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from howarth at nitro dot med dot uc dot edu  2006-09-22 14:27 -------
Opps. Looks like the proposed patch is incomplete.

http://gcc.gnu.org/ml/gcc/2006-09/msg00428.html

I will be testing...

Index: ffi_darwin.c
===================================================================
--- ffi_darwin.c        (revision 117142)
+++ ffi_darwin.c        (working copy)
@@ -94,7 +94,7 @@


   /* 'next_arg' grows up as we put parameters in it.  */
-  unsigned *next_arg = stack + 6; /* 6 reserved positions.  */
+  unsigned long *next_arg = stack + 6; /* 6 reserved positions.  */

   int i = ecif->cif->nargs;
   double double_tmp;
@@ -114,7 +114,7 @@
      Return values are referenced by r3, so r4 is the first parameter.  */

   if (flags & FLAG_RETVAL_REFERENCE)
-    *next_arg++ = (unsigned)(char *)ecif->rvalue;
+    *next_arg++ = (unsigned long)(char *)ecif->rvalue;

   /* Now for the arguments.  */
   for (;

,,,instead.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29181


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

* [Bug libffi/29181] libffi/src/powerpc/ffi_darwin.c not 64-bit clean
  2006-09-22 13:38 [Bug libffi/29181] New: libffi/src/powerpc/ffi_darwin.c not 64-bit clean howarth at nitro dot med dot uc dot edu
  2006-09-22 14:28 ` [Bug libffi/29181] " howarth at nitro dot med dot uc dot edu
@ 2006-09-22 16:51 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-22 16:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-09-22 16:51 -------


*** This bug has been marked as a duplicate of 29152 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29181


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

end of thread, other threads:[~2006-09-22 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-22 13:38 [Bug libffi/29181] New: libffi/src/powerpc/ffi_darwin.c not 64-bit clean howarth at nitro dot med dot uc dot edu
2006-09-22 14:28 ` [Bug libffi/29181] " howarth at nitro dot med dot uc dot edu
2006-09-22 16:51 ` pinskia at gcc dot gnu dot org

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