[Bug libffi/28313] libffi has not been ported to mips64-linux-gnu

2007-08-10 Thread daney at gcc dot gnu dot org


--- Comment #5 from daney at gcc dot gnu dot org  2007-08-10 15:42 ---
It should be working now.


-- 

daney at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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

--- You are receiving this mail because: ---
You reported the bug, or are watching the reporter.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



[Bug libffi/28313] libffi has not been ported to mips64-linux-gnu

2007-08-10 Thread daney at gcc dot gnu dot org


--- Comment #4 from daney at gcc dot gnu dot org  2007-08-10 15:36 ---
Subject: Bug 28313

Author: daney
Date: Fri Aug 10 15:35:55 2007
New Revision: 127336

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127336
Log:
PR libffi/28313
* configure.ac: Don't treat mips64 as a special case.
* Makefile.am (nodist_libffi_la_SOURCES): Add n32.S.
* configure: Regenerate
* Makefile.in: Ditto.
* fficonfig.h.in: Ditto.
* src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent.
(LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros.
(FFI_DEFAULT_ABI): Set for n64 case.
(FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases.
* src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE.
(ffi_closure_N32): New function.
(.eh_frame): New section
* src/mips/o32.S: Clean up comments.
(ffi_closure_O32): Pass ffi_closure parameter in $12.
* src/mips/ffi.c: Use FFI_MIPS_N32 instead of
_MIPS_SIM == _ABIN32 throughout.
(FFI_MIPS_STOP_HERE): New, use in place of
ffi_stop_here.
(ffi_prep_args): Use unsigned long to hold pointer values.  Rewrite
to support n32/n64 ABIs.
(calc_n32_struct_flags): Rewrite.
(calc_n32_return_struct_flags): Remove unused variable.  Reverse
position of flag bits.
(ffi_prep_cif_machdep): Rewrite n32 portion.
(ffi_call): Enable for n64.  Add special handling for small structure
return values.
(ffi_prep_closure_loc): Add n32 and n64 support.
(ffi_closure_mips_inner_O32): Add cast to silence warning.
(copy_struct_N32, ffi_closure_mips_inner_N32): New functions.

Modified:
trunk/libffi/ChangeLog
trunk/libffi/Makefile.am
trunk/libffi/Makefile.in
trunk/libffi/configure
trunk/libffi/configure.ac
trunk/libffi/fficonfig.h.in
trunk/libffi/src/mips/ffi.c
trunk/libffi/src/mips/ffitarget.h
trunk/libffi/src/mips/n32.S
trunk/libffi/src/mips/o32.S


-- 


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

--- You are receiving this mail because: ---
You reported the bug, or are watching the reporter.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Miscompiled statement a[i] = (a[i]++) % x;

2007-08-10 Thread Gregor Jasny

>Submitter-Id:  net
>Originator:Gregor Jasny
>Confidential:  no
>Synopsis:  Miscompiled statement a[i] = (a[i]++) % x;
>Severity:  non-critical
>Priority:  low
>Class:  c
>Category:  wrong-code
>Release:   gcc (GCC) 4.1.3 20070718 (prerelease) (Debian 4.1.2-14)
>Environment:
System: Linux Mini 2.6.22 #1 SMP Tue Jul 10 12:09:18 CEST 2007 i686 
GNU/Linux


host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v 
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --enable-nls 
--with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug 
--enable-mpfr --enable-checking=release i486-linux-gnu

>Description:
When the following program is compiled with gcc the output of the 
array-value is 1 2 3 4 5 6. Icc and cl produce the output 1 2 3 4 1 2. 
If the arrray is susbtituted by a simple scalar, the gcc output is 1 2 3 
4 1 2, too.


I don't know if the statement if even valid and behavior-defined C code. 
If it's not, then gcc maybe should warn somehow.


Thanks,
Gregor

PS: This hapens with gcc-snapshot 20070720-1, too.

>How-To-Repeat:
#include 

int main()
{
unsigned char a[42], b;
int i, idx = 1;

for (i=0; i<6; i++)
{
a[idx] = i;
a[idx] = (a[idx]++) % 4;

b = i;
b = (b++) % 4;

printf("i: %i %i\n", a[idx], b);
}

return 0;
}


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



[Bug libffi/12782] ffi.h #defines ffi_type_[us]long wrong on 32bit arches

2007-08-10 Thread green at redhat dot com


--- Comment #7 from green at redhat dot com  2007-08-10 09:18 ---
I believe the patch for this was checked in a long time ago.


-- 

green at redhat dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#436175: marked as done (streambuf inheritance problem.)

2007-08-10 Thread Debian Bug Tracking System
Your message dated Sat, 11 Aug 2007 15:59:53 +1200
with message-id <[EMAIL PROTECTED]>
and subject line closed
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: g++
Version: 4.1.3 20070718 (prerelease)

Creating two classes that inherit from std::ostream and std::streambuf.

When used with setw and characters:
  child << "some text" << std::setw(4) << "!";
only ever stores "some text"

However numerics work:
  child << "some text" << std::setw(4) << "1";
stores the desired "some text   1"

The child class code as written works perfectly in earlier g++ versions,
but fails in 4.1.3+ and 4.2.1+ (both the latest prereleases)

I have experimented by implementing every possible innheritable function
of both ostream and streambuf that I could find. None of the
un-implemented methods appears to be ever called.

The classes as written are:

class StoreEntryStream : public std::ostream
{

public:
StoreEntryStream(StoreEntry *anEntry) : std::ostream(&_buffer),
 _buffer(anEntry) { this->init(&_buffer);}

private:
StoreEntryStreamBuf _buffer;

public:
StoreEntryStreamBuf * rdbuf() const;
};



--- End Message ---
--- Begin Message ---
Turned out to be virtual-function type difference, implicitly cast in 
previous versions. But not in the new gcc.

The absence of a type-mismatch warning is another issue...

Sorry for the noise.
--- End Message ---