Attempting to compile the following code
------------ program objtest(input,output); type obj=object a:integer; constructor initialize; end;
procedure obj.initialize; begin a:=3; end;
var a,b:obj; begin b.a:=0; a.initialize; b:=a; writeln(b.a); end. -------------------
I received the following error message:
-------------- cd ~/pas/ gpc objtest.p objtest.p: In function `Obj_Initialize': objtest.p:10: Internal compiler error in `yyparse', at parse.y:3601 Please submit a full bug report. See URL:http://www.gnu.org/software/gcc/faq.html#bugreport for instructions.
Compilation exited abnormally with code 1 at Sun Aug 3 16:57:52 ______________
and I am complying with the instruction to report the error, though when I went to the above URL I found that it was dealing with C++ so I thought that I ought to mention it here.
Details Red Hat Linux release 7.3 (Valhalla) Kernel 2.4.18-3 on an i686
gpc --version
gives
2.1 (200205), based on gcc-2.95.4 20010315 (release)
(I realise that I should have written
constructor obj.initialize;
and when I do that the program compiles, but in view of the instruction in the error message I am writing to the mailling list.)
(If this is the wrong thing to do, I'm sorry.)
John O.
John Ollason wrote:
Attempting to compile the following code
program objtest(input,output); type obj=object a:integer; constructor initialize; end;
procedure obj.initialize; begin a:=3; end;
var a,b:obj; begin b.a:=0; a.initialize; b:=a; writeln(b.a); end.
I received the following error message:
cd ~/pas/ gpc objtest.p objtest.p: In function `Obj_Initialize': objtest.p:10: Internal compiler error in `yyparse', at parse.y:3601 Please submit a full bug report. See URL:http://www.gnu.org/software/gcc/faq.html#bugreport for instructions.
Compilation exited abnormally with code 1 at Sun Aug 3 16:57:52 ______________
and I am complying with the instruction to report the error, though when I went to the above URL I found that it was dealing with C++ so I thought that I ought to mention it here.
Details Red Hat Linux release 7.3 (Valhalla) Kernel 2.4.18-3 on an i686
gpc --version
gives
2.1 (200205), based on gcc-2.95.4 20010315 (release)
(I realise that I should have written
constructor obj.initialize;
and when I do that the program compiles, but in view of the instruction in the error message I am writing to the mailling list.)
(If this is the wrong thing to do, I'm sorry.)
That's correct. (The URL was referring to GCC; newer versions of GPC give a better message.)
We've changed quite a bit since the release of 20020510, and probably this bug was fixed as well in the process -- at least I don't get it anymore. Anyway, I'm putting your code in the test suite (john3.pas) to be sure it doesn't appear again.
Thanks for the report.
Frank