-gt causes compiler errors in this specific case on the second compile
Original Reporter info from Mantis: Hixie
-
Reporter name: Ian Hickson
Original Reporter info from Mantis: Hixie
- Reporter name: Ian Hickson
Description:
If you compile the attached test.pas program with -gt on x86_64 twice in a row, without clearing the compiler output in between (this is what build.sh does), then the second compilation gives an Error. The first doesn't.
Making almost any substantial change to the source file either fixes the problem or causes a crash. For example, removing the unused private declarations in unit2.pas removes the problem, as does removing the CODEPAGE directive in unit1 or unit3, or removing the body of TTest3.TestMethod(), or removing the unused Test1A() function in unit1, or compiling without -gt the second time. Commenting out the unused "0" line in the Test1Record variant section (or removing any of Integer1..Integer3) causes the compiler to crash. Commenting out the interface declaration of the operator overload in unit1 causes the second compilation to give the following error message:
unit1.pas(33,12) Error: Incompatible types: got "Constant String" expected "^@^@^@^@^@^@^@\240y^G\207l^?^@^@\240y^G\207l^?^@^@`^@^@^@^@^@^@^@\220L^D^_\377^?^@^@\231\212A^@^@^@^@^@\200\231^B\207l^?^@^@^A^@^@^@^@^@^@^@\220L^D^_\377^?^@^@\275zA^@^@^@^@^@\230\354\215"