Re: [fpc-devel] Currency bug and FPC 3.2.0
Then seems that bug reported here https://bugs.freepascal.org/view.php?id=33439 and in related reports is back again? I have reported it as a new bug: https://bugs.freepascal.org/view.php?id=36176 I'll check the currency stuff the next days, I have still some uncommitted patches regarding this lying around. Just reminder (to Florian) ;-) (any news on this topic) L. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
Am 14.10.19 um 08:57 schrieb LacaK: Then seems that bug reported here https://bugs.freepascal.org/view.php?id=33439 and in related reports is back again? I have reported it as a new bug: https://bugs.freepascal.org/view.php?id=36176 I'll check the currency stuff the next days, I have still some uncommitted patches regarding this lying around. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
var c: currency; begin c:=922337203685.47; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); c:=-92233720368547; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); end. 3.0.4 win32 922337203685.4700 = Trunc(c*1)=9223372036854700 -92233720368547. = Trunc(c*1)=-92233720368547 3.3.1 r42348 win32 922337203685.4700 = Trunc(c*1)=9223372036854700 -92233720368547. = Trunc(c*1)=-92233720368547 3.0.4 win64 C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test 922337203685.4700 = Trunc(c*1)=-75 -92233720368547. = Trunc(c*1)=7580 3.3.1 r42348 win64 922337203685.4700 = Trunc(c*1)=-75 -92233720368547. = Trunc(c*1)=7580 Thanks for confirming it! Then seems that bug reported here https://bugs.freepascal.org/view.php?id=33439 and in related reports is back again? I have reported it as a new bug: https://bugs.freepascal.org/view.php?id=36176 -Laco. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
On Fri, Oct 11, 2019 at 7:29 AM LacaK wrote: var c: currency; begin c:=922337203685.47; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); c:=-92233720368547; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); end. 3.0.4 win32 922337203685.4700 = Trunc(c*1)=9223372036854700 -92233720368547. = Trunc(c*1)=-92233720368547 3.3.1 r42348 win32 922337203685.4700 = Trunc(c*1)=9223372036854700 -92233720368547. = Trunc(c*1)=-92233720368547 3.0.4 win64 C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test 922337203685.4700 = Trunc(c*1)=-75 -92233720368547. = Trunc(c*1)=7580 3.3.1 r42348 win64 922337203685.4700 = Trunc(c*1)=-75 -92233720368547. = Trunc(c*1)=7580 Thanks for confirming it! Then seems that bug reported here https://bugs.freepascal.org/view.php?id=33439 and in related reports is back again? -Laco. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
On Fri, Oct 11, 2019 at 7:29 AM LacaK wrote: > var >c: currency; > begin >c:=922337203685.47; >writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); >c:=-92233720368547; >writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); > end. 3.0.4 win32 922337203685.4700 = Trunc(c*1)=9223372036854700 -92233720368547. = Trunc(c*1)=-92233720368547 3.3.1 r42348 win32 922337203685.4700 = Trunc(c*1)=9223372036854700 -92233720368547. = Trunc(c*1)=-92233720368547 3.0.4 win64 C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test 922337203685.4700 = Trunc(c*1)=-75 -92233720368547. = Trunc(c*1)=7580 3.3.1 r42348 win64 922337203685.4700 = Trunc(c*1)=-75 -92233720368547. = Trunc(c*1)=7580 -- Bart ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
(sorry here is whole program) Win64 target! (on Win32 it works as expected for me) var c: currency; begin c:=922337203685.47; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); c:=-92233720368547; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); end. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
Then FPCUpDeluxe uses different approach to build FPC compiler? Because when I test with Lazarus/FPC build from 3.2 branch bug is still there. Maybe the fix also depends on other changes that have not been merged. May be that FPCUpDeluxe uses only one build cycle ... so FPC 3.2 is build using FPC 3.0.4 ? That would seem very unlikely. You would have to really go out of your way to disable the complete make cycle. A standard "make all" at the top level of the fpc source directory automatically does this. Hm, seems that also in TRUNK there is still problem. (I rebuild my FPC installation using FPCUpDeluxe) Can you test please what results do you get for: Win64 target! (on Win32 it works as expected for me) c:=922337203685.47; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); c:=-92233720368547; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); IIUC fix introduced in rev. 38555 and folloved rev. 38558 should handle just this situation, does not? L. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
Then FPCUpDeluxe uses different approach to build FPC compiler? Because when I test with Lazarus/FPC build from 3.2 branch bug is still there. Maybe the fix also depends on other changes that have not been merged. May be that FPCUpDeluxe uses only one build cycle ... so FPC 3.2 is build using FPC 3.0.4 ? That would seem very unlikely. You would have to really go out of your way to disable the complete make cycle. A standard "make all" at the top level of the fpc source directory automatically does this. Hm, seems that also in TRUNK there is still problem. (I rebuild my FPC installation using FPCUpDeluxe) Can you test please what results do you get for: c:=922337203685.47; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); c:=-92233720368547; writeln(c:18:4,' = ', ' Trunc(c*1)=', Trunc(c*1)); IIUC fix introduced in rev. 38555 and folloved rev. 38558 should handle just this situation, does not? L. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
On Thu, Oct 10, 2019 at 12:51 PM Bart wrote: > AFAIK: Building involves a cycle where the new compiler compiles [snip] I swear, at the time I wrote that, the previous answers did not show up in my mail client. Feeling a bit silly now. -- Bart ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
On Thu, Oct 10, 2019 at 8:12 AM LacaK wrote: > These patches are already merget to 3.2 branch, but there is condition > {$ifndef VER3_0} > > Am I right in assumption, that when FPC 3.2.0 compiler will be released > he will be build using FPC 3.0.4 ? > If yes then this patch will be not included in upcoming FPC 3.2.0. AFAIK: Building involves a cycle where the new compiler compiles itself (and that new one compiles itself again). At that point VER3_0 will not be defined anymore. -- Bart ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
On 2019-10-10 08:30, LacaK wrote: Then FPCUpDeluxe uses different approach to build FPC compiler? Because when I test with Lazarus/FPC build from 3.2 branch bug is still there. Maybe the fix also depends on other changes that have not been merged. May be that FPCUpDeluxe uses only one build cycle ... so FPC 3.2 is build using FPC 3.0.4 ? That would seem very unlikely. You would have to really go out of your way to disable the complete make cycle. A standard "make all" at the top level of the fpc source directory automatically does this. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
Dňa 10.10.2019 o 8:24 Jonas Maebe napísal(a): On 2019-10-10 08:03, LacaK wrote: These patches are already merget to 3.2 branch, but there is condition {$ifndef VER3_0} Am I right in assumption, that when FPC 3.2.0 compiler will be released he will be build using FPC 3.0.4 ? Yes. If yes then this patch will be not included in upcoming FPC 3.2.0. No. Building FPC starts with a "make cycle", which means the compiler gets built using the bootstrap compiler, then using the generated compiler, and so on, until two generated compiler binaries are identical (or until the Makefile detects this process does not converge quickly enough). The final compiler binary produced by this process is the installed/shipped one. Thanks. Then FPCUpDeluxe uses different approach to build FPC compiler? Because when I test with Lazarus/FPC build from 3.2 branch bug is still there. May be that FPCUpDeluxe uses only one build cycle ... so FPC 3.2 is build using FPC 3.0.4 ? -Laco. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Currency bug and FPC 3.2.0
On 2019-10-10 08:03, LacaK wrote: These patches are already merget to 3.2 branch, but there is condition {$ifndef VER3_0} Am I right in assumption, that when FPC 3.2.0 compiler will be released he will be build using FPC 3.0.4 ? Yes. If yes then this patch will be not included in upcoming FPC 3.2.0. No. Building FPC starts with a "make cycle", which means the compiler gets built using the bootstrap compiler, then using the generated compiler, and so on, until two generated compiler binaries are identical (or until the Makefile detects this process does not converge quickly enough). The final compiler binary produced by this process is the installed/shipped one. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel