Adriaan van Os wrote:
Waldek Hebisch wrote:
I guess that the constant 1.0 is internally long double. In any case with the code below (which I belive is accurate translation of your functon) I got the same error from C compiler:
void R(double * r1, double *r2, long double * c) { if (*r1 != *r2) { *r1 = *r2 - *c; } }
Yes, it's a backend bug.
Fixed in gcc mainline for the powerpc-apple-darwin target, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11848.
So, I now tried the testsuite with the gcc-3.4.3 based compiler. The result- several failures and crashes. I tried in C and reported it as a gcc bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19993.
The answer to my bug report, I believe, is nonsense. Because of this and because of this earlier comment:
Geoff Keating wrote:
Note that even when this is fixed, -mlong-double-128 (and especially this testcase) won't work on Darwin because the library support for it is not there. That's not a GCC problem.
... I would be curious to know the result on ppc Linux or ppc AIX of the following (in Pascal and C)
program LongReals; var R: LongReal; begin R:= sin( 1.2345); WriteLn( 'SizeOf( LongReal) = ', SizeOf( LongReal)); WriteLn( 'sin( 1.2345) = ', R:1:30); WriteLn( 'sin( 1.2345) = ', R:1:30, ' = ', R:1:30); WriteLn( 'sin( 1.2345) = ', R:1:30, ' = ', R:1:30, ' = ', R:1:30); end.
#include <stdio.h>
int main( void ) { long double R; R = sin( 1.2345); printf( "sizeof( long double) = %d\n", sizeof( long double)); printf( "sin( 1.2345) = %1.30Lf = %1.30Lf\n", R, R); return 0; }
So, if someone has the hardware at hand (I have tried before to install debian ppc64 linux but it doesn't recognize any of my G5's IDE or SATA drives).
Regards,
Adriaan van Os