summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw8465.pp
blob: d315b1b822171259178bf539299fb9e17ff24046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
program EnumPtrConvTest;

{$APPTYPE CONSOLE}

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}
{$packenum 1}

type
  TEnum = (a, b);

var
  e: TEnum;
  p: Pointer;

begin
  e := b;
  p := Pointer(e);
  if PtrUInt(p)<>1 then
    halt(1); // produces "1" in Delphi
end.