Hello all,
First things first
- machine: Intel Core i5 M430 (Nehalem architecture) @ 2.266 GHz, 4 GByte RAM
- system: Windows 7 Home Edition, Service Pack 1, 64 bit
- compiler: FPC 3.2.2 x86_64 in 64 bit mode
I have implemented some larger algebra stuff and discovered two compiler issues (I think)
* an assert in the code, when compiled with {$assertions on}, leads to a call of a sub-function two source lines later with an incorrect value handed over (and a subsequent SIGSEGV) - only happens with -O2 or higher optimisation settings
** I inspected the generated asm and it looks like the compiler is loosing track of register allocation
** my current work-around is to comment the assert out and everything works ok under all optimisation levels then
* a function declaration as inline leads to incorrect calculations - happens on all optimisation level settings
** I have not drilled down this one further, as the inlined function has ~50 LOC and following that in asm is a bit tedious
** current work-around - remove inline decoration and all computations work correct
Bringing the two above to minimum compilable demos will take me a couple of days (if feasible at all), and the result will still have a couple of 1.000 LOC in both cases. I'm willing to spent the effort if this helps. However I have two questions on this
* are the compiler devs aware of such/similar issue
** maybe working on it already, or
** in desperate hunt for a reproducible demo, to inspect this
* can somebody help me generate a ticket, once I have created a minimal compilable demo?
Cheers,
MathMan