[fpc-devel] Wrong debug info when using clang backend

Jonas Maebe jonas at freepascal.org
Wed Dec 6 21:05:38 CET 2023


On 06/12/2023 17:37, Martin Frb via fpc-devel wrote:
> Not suer if the issue is within Fpc or clang...
> 
> Should this be reported against Fpc?

FPC defines the variables' debug info at the start of the function and 
defines their lifetime as starting at the beginning of the function and 
continuing until the end. But LLVM is free to modify these if it notices 
these are too pessimistic

My guess is that even without optimisations, LLVM notices these 
variables' values are not really used later on and reduces the 
variables' live range.


Jonas


More information about the fpc-devel mailing list