View Issue Details

IDProjectCategoryView StatusLast Update
0019673FPCCompilerpublic2019-02-16 23:32
ReporterJoost van der SluisAssigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionnot fixable 
Platformx86_64OSLinuxOS VersionFedora 15
Product Version2.5.1Product Build 
Target VersionFixed in Version 
Summary0019673: Problems with circular references and inline procedures.
DescriptionWhen you compile the IdGlobal unit from the attached zip-file, the IdStreamVCL unit is also compiled. But, the ppu-checksum (of the IdGlobal dependency) within the IdStreamVCL.ppu does not match the ppu-checksum of the IdGlobal.ppu itself. While they are both compiled in the same run of the compiler.

When IdGlobal is compiled for a second time, the dependencies do match.

This happens only when the IdGlobal unit has at least one inlined function, and there is a circular dependency. (When two units are referencing each-other, all goes well. The problem does occur with three units, though. As in the attached test)
Steps To Reproduce1: compile IdGlobal
2: ppudump Idlobal.ppu, look for the checksum of the IdGlobal.ppu
3: ppudump IdStreamVCL, search for the IdGlobal checksum and notice that it does not match with the checksum of step 2.
4: compile IdGlobal again
5: ppudump IdStreamVCL, now the IdGlobal checksum matches the checksum from step 2.

To do the test again, remove all .ppu files and compile again...
TagsNo tags attached.
Fixed in Revision
FPCOldBugId0
FPCTarget
Attached Files

Relationships

duplicate of 0024121 resolvedJonas Maebe Incorrect PPU file produced: CRC for a 'Use Unit' section wrongly stored into calling unit 

Activities

2011-07-03 13:26

 

inline_circ.zip (777 bytes)

Jonas Maebe

2011-07-12 00:09

manager   ~0049893

That is how the inlining is implemented by design currently. The availability of an inline function body changes the unit interface checksum, so that other units using that unit will be recompiled the next time and can use the inline body (since the first time the inline body was not yet available, it could not yet be inlined).

ChrisF

2013-03-23 17:34

reporter   ~0066511

Unless I'm wrong, step 4 should be:
4: compile IdStreamVCL this time

Florian

2013-07-14 21:05

administrator   ~0068854

As explained by Jonas, there is no way around this.

Jonas Maebe

2014-03-19 22:54

manager   ~0073857

The availability of inline function bodies now no longer trigger recompilations.

Issue History

Date Modified Username Field Change
2011-07-03 13:26 Joost van der Sluis New Issue
2011-07-03 13:26 Joost van der Sluis File Added: inline_circ.zip
2011-07-03 13:26 Joost van der Sluis FPCOldBugId => 0
2011-07-12 00:09 Jonas Maebe Note Added: 0049893
2013-03-23 17:34 ChrisF Note Added: 0066511
2013-03-24 17:11 Florian Relationship added has duplicate 0024121
2013-07-14 21:05 Florian Note Added: 0068854
2013-07-14 21:05 Florian Status new => resolved
2013-07-14 21:05 Florian Resolution open => not fixable
2013-07-14 21:05 Florian Assigned To => Florian
2014-03-19 22:54 Jonas Maebe Relationship replaced duplicate of 0024121
2014-03-19 22:54 Jonas Maebe Note Added: 0073857
2019-02-16 23:32 Joost van der Sluis Status resolved => closed