Browse Source

* enhance check

pierre 22 years ago
parent
commit
168690c833
1 changed files with 14 additions and 2 deletions
  1. 14 2
      tests/tbs/tb0434.pp

+ 14 - 2
tests/tbs/tb0434.pp

@@ -1,7 +1,19 @@
+
+function dummy : longint;
+begin
+  dummy:=1;
+end;
+
 var
 var
  x:function:longint;
  x:function:longint;
+ x2:function:longint;
  y:pointer absolute x;
  y:pointer absolute x;
+ y2:pointer absolute x2; 
 begin
 begin
-  if y<>nil then
-   halt(1);
+  x2:=@dummy;
+  if (y<>nil) or (y2<>pointer(@dummy)) then
+   begin
+     Writeln('Wrong code generated for absolute to procvarsmy');
+     halt(1);
+   end;
 end.
 end.