On 16 Feb 2005 at 18:36, Adriaan van Os wrote:
Ah, thanks but I forgot to ask passing -mlong-double-128 as a command-line option. Without that option, the output of gpc and gcc is correct on powerpc-apple-darwin.
Alas I also know little about AIX, having moved to the larger machine only when I had a Delphi program that needed more power.
There is some discussion of AIX and GCC at http://www-106.ibm.com/developerworks/eserver/articles/gnu.html
this suggests that from AIX 5.2 (which I am using) the default is - mcpu=powerpc.
Anyhow I've tried it with -mlong-double-128 and there does seem to be a lack of precision in the output, even when it works!
original test program with sin()
32 bit gpc compilation (with warnings)
SizeOf( LongReal) = 16
Program received signal SIGSEGV, Segmentation fault. $1000dd44 in _p_Write_Real ()
backtrace #0 $1000dd44 in _p_Write_Real () #1 $10000668 in pascal_main_program () at longreal.pas:13 #2 $10000984 in main (argc=1, argv=$2ff22b04, envp=$2ff22b0c) at longreal.pas:10
64 bit gpc compilation (-maix64) SizeOf( LongReal) = 16 sin( 1.2345) = 0.9 sin( 1.2345) = 0.9 = 0.9 sin( 1.2345) = 0.9 = 0.9 = 0.9
new version test program with R:= 1.234567890123456789012345678900;
32 bit gpc compilation (with warnings) SizeOf( LongReal) = 16 R = 1 R = 1 = 1 R = 1 = 1 = 1
64 bit gpc compilation (-maix64)
SizeOf( LongReal) = 16 R = 1.2 R = 1.2 = 1.2 R = 1.2 = 1.2 = 1.2
32 bit gcc compilation pkeenan@doc:~/opt04$ ~/local/bin/gcc -mlong-double-128 longreal2.c longreal2.c: In function `main': longreal2.c:10: error: insn does not satisfy its constraints: (insn 53 52 28 0 (set (reg:TF 4 r4) (mem:TF (plus:SI (reg/f:SI 31 r31) (const_int 80 [0x50])) [0 S16 A8])) 269 {*movtf_internal} (nil) (nil)) longreal2.c:10: internal compiler error: in extract_constrain_insn_cached, at recog.c:2090 Please submit a full bug report, with preprocessed source if appropriate.