Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Generics    [ Add a report in this area ]  
Report #:  118815   Status: Closed
[XE5 REGRESSION] Generic method inlining (Part 2)
Project:  Delphi Build #:  19.0.13476.4176
Version:    19.0 Submitted By:   Blaise Thorn
Report Type:  Basic functionality failure Date Reported:  9/9/2013 2:13:46 PM
Severity:    Serious / Highly visible problem Last Updated: 12/22/2013 11:32:19 PM
Platform:    All platforms Internal Tracking #:   43477
Resolution: Fixed (Resolution Comments) Resolved in Build: : XE5 Update 2
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: 60
Description
A second case where INLINE generic methods are no longer inlined.

This is a regression happened in Delphi XE5.

This is a follow-up to QC 118657 / RS 43241.

See QC 121336 / RS 46290 for the next issue.
Steps to Reproduce:
See the attached test case.
Expected output (as seen with XE4):
PASS: #1
Actual output (since XE5):
FAIL: #1

Here is the core unit:
----------8<----------
unit Test1;

interface

type OtherG<T> = class

procedure Culprit1;

procedure Culprit2; inline;
end;

type G<T> = class

var F: OtherG<T>;

function NotInlinedSinceZ7: Pointer; inline;

procedure Test;
end;

implementation


uses Logger;

procedure OtherG<T>.Culprit1; begin end;

procedure OtherG<T>.Culprit2; begin end;

function G<T>.NotInlinedSinceZ7: Pointer;
begin

// either one of these will do:

F.Culprit1;

F.Culprit2;

result := ReturnAddress
end;

procedure G<T>.Test;
begin

Paragon := ReturnAddress;

Report( NotInlinedSinceZ7(), '#1' );
end;

end.
----------8<----------
Workarounds
None
Attachment
qc118815.zip
Comments

None

Server Response from: ETNACODE01