Browse Source

+ typed const alignment bug

pierre 26 years ago
parent
commit
8e8348c304
2 changed files with 23 additions and 0 deletions
  1. 22 0
      bugs/bug0251.pp
  2. 1 0
      bugs/readme.txt

+ 22 - 0
bugs/bug0251.pp

@@ -0,0 +1,22 @@
+
+
+const
+  c : byte = 5;
+  r : real = 3.4;
+var
+  l : longint;
+  cc : char;
+  rr : real;
+
+begin
+  l:=longint(@r);
+  if (l mod 4)<>0 then
+    begin
+       Writeln('static const are not aligned properly !');
+    end;
+  l:=longint(@rr);
+  if (l mod 4)<>0 then
+    begin
+       Writeln('static var are not aligned properly !');
+    end;
+end.

+ 1 - 0
bugs/readme.txt

@@ -344,3 +344,4 @@ bug0245.pp   assigning pointers to address of consts is allowed (refused by BP !
 bug0246.pp   const para can be changed without error
 bug0246.pp   const para can be changed without error
 bug0249.pp   procedure of object cannot be assigned to property.
 bug0249.pp   procedure of object cannot be assigned to property.
 bug0250.PP   error with Ansistrings and loops.
 bug0250.PP   error with Ansistrings and loops.
+bug0251.pp   typed const are not aligned correctly