View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038114 | FPC | Compiler | public | 2020-11-22 13:05 | 2020-11-22 13:28 |
Reporter | OkobaPatino | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0038114: Inlining cast managed typed to unmanaged | ||||
Description | Currently, the compiler can not inline calling functions like Test2, and it needs to make separate variants for each param to enable inlining. program Project1; function Test1(A: PChar): PChar; inline; begin Result := A + 1; end; var S: String; P: PChar; begin S := 'Test'; P := Pointer(S); //Inlined P := Test1(P); P := Test1(Pointer(S)); //Not inlined end. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
There is no need to file bug reports about such cases. The default is "inline if the inline modifier is used", and then there are a bunch of cases that are excluded because the compiler currently cannot handle them. |
|
I wanted something to monitor so when it is fixed; it can be possible to clean the code from many useless variants like the Test1 case. Otherwise, it will be needed to check once in a while that if the compiler inlines this or not. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-22 13:05 | OkobaPatino | New Issue | |
2020-11-22 13:15 | Jonas Maebe | Note Added: 0127096 | |
2020-11-22 13:16 | Jonas Maebe | Note Edited: 0127096 | View Revisions |
2020-11-22 13:28 | OkobaPatino | Note Added: 0127098 |