Browse Source

+ bug0184

Jonas Maebe 27 years ago
parent
commit
75086759b1
2 changed files with 26 additions and 0 deletions
  1. 25 0
      bugs/bug0184.pp
  2. 1 0
      bugs/readme.txt

+ 25 - 0
bugs/bug0184.pp

@@ -0,0 +1,25 @@
+Program Bug0184;
+
+{ multiple copies of the constant sets are stored in the assembler file when
+  they are needed more than once}
+
+Var BSet: Set of Byte;
+    SSet: Set of 0..31;
+    b,c: byte;
+    s: 0..31;
+
+Begin
+  BSet := BSet + [b];  {creates a big, empty set}
+  BSet := BSet + [c];  {creates another one}
+  BSet := BSet + [3];  {creates a big set with element three set}
+  BSet := BSet + [3];  {and antoher one}
+
+  SSet := SSet + [5];  {creates a small set containing 5}
+  SSet := SSet + [s];  {creates a small, empty set}
+  SSet := SSet + [5];  {creates another small set containing 5}
+  SSet := SSet + [s];  {creates another small, empty set}
+
+{BTW: small constant sets don't have to be stored seperately in the
+ executable, as they're simple 32 bit constants, like longints!}
+
+End.

+ 1 - 0
bugs/readme.txt

@@ -235,3 +235,4 @@ bug0169.pp   missing new(type) support for not object/class
 bug0171.pp   missing typecasting in constant expressions
 bug0171.pp   missing typecasting in constant expressions
 bug0182.pp   @record.field doesn't work in constant expr
 bug0182.pp   @record.field doesn't work in constant expr
 bug0183.pp   internal error 10
 bug0183.pp   internal error 10
+bug0184.pp   multiple copies of the same constant set are stored in executable