View Issue Details

IDProjectCategoryView StatusLast Update
0038165FPCCompilerpublic2020-12-04 18:33
ReporterBenjamin Rosseaux Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version3.3.1 
Summary0038165: {$excessprecision on} breaks 32-bit floating-point calculation stuff at x86_64 targets
Description{$excessprecision on} breaks 32-bit floating-point calculation stuff at x86_64 targets

At first I thought that r47245/r42746 broke my DSP audio processing float things in my Sobanth project (which compiles with FPC & Delphi), but then I found out that {$excessprecision off} fixes/bypasses that. With Delphi with {$excessprecision on} it works perfectly, but with FPC my Sobanth DSP code with {$excessprecision on} only produces terrible noise, as if the binary float data type is wrong after a mathematical operation, which leads to audible terrible distorted noise audio signal.

I will try to isolate this later somehow to create a test case from it, if that is possible at all, since the Sobanth DSP code is very deeply nested.

I just want to inform here already that there is probably something broken in the compiler in this regard.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Florian

2020-12-04 17:23

administrator   ~0127344

What targets are you talking about? linux and win64? Best bet is probably to diff the generated assembler before and after.

As FPC never had {$excessprecision on}, it might contain indeed bugs because it is tested little.

Benjamin Rosseaux

2020-12-04 18:33

reporter   ~0127346

Currently Win64, and from the SVN revision 47245 "* delphi has excessprecision turned on by default" on (and it seems to be a commit from you :-) ), excessprecision seems to be automatically enabled when the Delphi mode is selected per {$mode delphi}. I used a FPC SVN revision from the summer, until yesterday or two days ago, where I've updated my work FPC and Lazarus builds to the each current lastest SVN trunk revisions, and where I noticed just this problem from now on.

Of course, I'll make further tests in this regard, as soon as I find the time.

Issue History

Date Modified Username Field Change
2020-12-04 06:25 Benjamin Rosseaux New Issue
2020-12-04 17:23 Florian Note Added: 0127344
2020-12-04 18:33 Benjamin Rosseaux Note Added: 0127346