Hi Folks,
something went terribly wrong with the latest release of GPC on IRIX. Here is a short test code:
program testit;
var x:real;
begin x:=355/113; writeln(round(355/113):10); writeln(355/113:12:8); writeln(round(355/113):10,' ',355/113:12:8); writeln(355/113:12:8,' ',round(355/113)); writeln(round(355/113*100)); writeln(round(355/113*10000)); writeln(round(x):10); writeln(x:12:8); writeln(round(x),' ',x:12:8); writeln(round(x*100)); writeln(round(x*10000)); end.
And here is the output piped to 'cat -v' (note the invisible characters):
3 0.000.^@^@00 3 3.15923292 0.000.^@^@00 3 314 31416 3 0.000.^@^@00 3 0.00000000 314 31416
Also note that the real value in the third line is incorrect.
The version:
Reading specs from /usr/local/test/lib/gcc-lib/mips-sgi-irix6.5/2.95.2/specs gpc version 20010502, based on 2.95.2 19991024 (release)
The OS: IRIX 6.5.12
The log of the make process and the result of the test programs are attached.
The compilation of the most recent version of GPC is not resulting a valid binary.
Any idea about this?
Cheers,
miklos
Miklos Cserzo wrote:
something went terribly wrong with the latest release of GPC on IRIX. Here is a short test code:
program testit;
var x:real;
begin x:=355/113; writeln(round(355/113):10); writeln(355/113:12:8); writeln(round(355/113):10,' ',355/113:12:8); writeln(355/113:12:8,' ',round(355/113)); writeln(round(355/113*100)); writeln(round(355/113*10000)); writeln(round(x):10); writeln(x:12:8); writeln(round(x),' ',x:12:8); writeln(round(x*100)); writeln(round(x*10000)); end.
And here is the output piped to 'cat -v' (note the invisible characters):
3
0.000.^@^@00 3 3.15923292 0.000.^@^@00 3 314 31416 3 0.000.^@^@00 3 0.00000000 314 31416
Also note that the real value in the third line is incorrect.
It's quite likely that a number of errors reported by the test suite as well as the one above (miklos5.pas) are due to a bug in rts/move.pas which is also found by the test suite:
TEST moveword.pas: Failed: 5: 6/4
So, this one must be fixed first, then (I hope) many other errors are also gone.
I've looked through rta/move.pas and I'm changing a few things, though I'm not sure what exactly is (was) wrong. Could you please try the following program. If it gives two different values, I might have found the cause of the problem and can fix it.
program Foo; begin WriteLn (SizeOf (MedWord), ' ', AlignOf (MedWord)) end.
Frank
On Thu, 5 Jul 2001, Frank Heckenbach wrote:
It's quite likely that a number of errors reported by the test suite as well as the one above (miklos5.pas) are due to a bug in rts/move.pas which is also found by the test suite:
TEST moveword.pas: Failed: 5: 6/4
So, this one must be fixed first, then (I hope) many other errors are also gone.
I've looked through rta/move.pas and I'm changing a few things, though I'm not sure what exactly is (was) wrong. Could you please try the following program. If it gives two different values, I might have found the cause of the problem and can fix it.
program Foo; begin WriteLn (SizeOf (MedWord), ' ', AlignOf (MedWord)) end.
the output is:
4 4
Cheers,
miklos
Miklos Cserzo wrote:
On Thu, 5 Jul 2001, Frank Heckenbach wrote:
It's quite likely that a number of errors reported by the test suite as well as the one above (miklos5.pas) are due to a bug in rts/move.pas which is also found by the test suite:
TEST moveword.pas: Failed: 5: 6/4
So, this one must be fixed first, then (I hope) many other errors are also gone.
I've looked through rta/move.pas and I'm changing a few things, though I'm not sure what exactly is (was) wrong. Could you please try the following program. If it gives two different values, I might have found the cause of the problem and can fix it.
program Foo; begin WriteLn (SizeOf (MedWord), ' ', AlignOf (MedWord)) end.
the output is:
4 4
Too bad, that's correct. ;-)-:
As I've said, I've changed a few things which looked a little suspicious, but not directly wrong. After that patch is uploaded (soon), you might want to test again. If that doesn't help, I'm afraid, I don't have the time for more extensive debugging now, so please come back to me with this problem in a month or so.
Frank