The following produces an internal compiler error:
[G4:~/gnu/testgpc/adriaan] adriaan% cat compare.pas program Compare; procedure R ( var r1, r2: real); begin if r1 <> r2 then r1:= r2 - 1.0 end; begin end.
[G4:~/gnu/testgpc/adriaan] adriaan% gpc -o compare compare.pas -mlong-double-128 compare.pas: In procedure `R': compare.pas:6: error: unrecognizable insn: (insn 26 34 27 2 0x0 (set (reg:SI 126) (subreg:SI (reg:TF 33 f1) 0)) -1 (nil) (nil)) compare.pas:6: internal compiler error: in extract_insn, at recog.c:2175
It may be, of course, that the Darwin target doesn't properly support the -mlong-double-128 PowerPC processor option. If it's a gcc back-end bug, I can report it to Bugzilla.
However, the "real" type used is 64-bit on the Darwin target, with or without -mlong-double-128 ... The option only changes the size of the "longreal" and "extended" types to 128-bit.
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; } }
hebisch@student:/arc/pom/gcc1/pp$ ../gpc-mac/gcc/xgcc -B../gpc-mac/gcc -mlong-double-128 -S longd.c longd.c: In function `R': longd.c:12: error: unrecognizable insn: (insn 27 35 28 2 (nil) (set (reg:SI 126) (subreg:SI (reg:TF 33 f1) 0)) -1 (nil) (nil)) longd.c:12: internal compiler error: in extract_insn, at recog.c:2175 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://gcc.gnu.org/bugs.html for instructions. hebisch@student:/arc/pom/gcc1/pp$ ../gpc-mac/gcc/xgcc -v -B../gpc-mac/gcc -mlong-double-128 Reading specs from ../gpc-mac/gcc/specs Configured with: ../gcc-3.3.1/configure --enable-languages=pascal,c --enable-checking --target=ppc-darwin Thread model: single gcc version 3.3.1
If the third argument is changed to double then the error vanishes.