Inlining causes Internal error 200208151
Original Reporter info from Mantis: Blaise
-
Reporter name: Blaise.ru
Original Reporter info from Mantis: Blaise
- Reporter name: Blaise.ru
Description:
In the provided case the compiler produces an invalid .ppu file, which it subsequently cannot load.
Internal error goes away if either:
- directive "inline" is removed
- string type is changed from PWideChar to PAnsiChar
Steps to reproduce:
Compile the following unit.
Try to use it from a program. The compiler throws Internal error 200208151.
---8<-------8<-------8<---
unit offender;
{$mode Delphi}
interface
procedure foo(const s: PWideChar; const n: integer); inline;
function bar(const s, fmt: PWideChar): integer; cdecl; varargs; external 'user32.dll' name 'wsprintfW';
implementation
procedure foo(const s: PWideChar; const n: integer);
begin
bar(s, '%d', n)
end;
end.
---8<-------8<-------8<---
Additional information:
Reproducible with 2.5.1 from the trunk.
Mantis conversion info:
- Mantis ID: 15909
- Platform: Win32
- Version: 2.4.0
- Fixed in version: 2.4.2
- Fixed in revision: 15201 (#78e19bdd)
- Target version: 2.4.2