readme.txt 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. This directory contains test files for various FPC bugs.
  2. The most files are very simple and it's neccessary to check the assembler
  3. output.
  4. The first coloumn contains the file name. If the file name is indended,
  5. the bug is fixed and the last coloumn contains the version where
  6. the bug is fixed.
  7. In future, please add also your name short cut, when fixing a bug.
  8. Fixed bugs:
  9. -----------
  10. bug0001.pp tests a bug in the .ascii output (#0 and too long) OK 0.9.2
  11. bug0002.pp tests for the endless bug in the optimizer OK 0.9.2
  12. bug0003.pp dito OK 0.9.2
  13. bug0004.pp tests the continue instruction in the for loop OK 0.9.2
  14. bug0005.pp tests the if 1=1 then ... bug OK 0.9.2
  15. bug0006.pp tests the wrong floating point code generation OK 0.9.2
  16. bug0007.pp tests the infinity loop when using byte counter OK 0.9.2
  17. bug0008.pp tests the crash when decrementing constants OK 0.9.2
  18. bug0009.pp tests comperations in function calls a(c<0); OK 0.9.2
  19. bug0010.pp tests string constants exceeding lines OK 0.9.2
  20. bug0011.pp tests div/mod bug, where edx is scrambled, if
  21. a called procedure does a div/mod OK 0.9.2
  22. bug0012.pp tests type conversation byte(a>b) OK 0.9.9 (FK)
  23. bug0015.pp tests for wrong allocated register for return result
  24. of floating function (allocates int register) OK 0.9.2
  25. bug0018.pp tests for the possibility to declare all types
  26. using pointers "forward" : type p = ^x; x=byte; OK 0.9.3
  27. bug0021.pp tests compatibility of empty sets with other set
  28. and the evalution of constant sets OK 0.9.3
  29. bug0022.pp tests getting the address of a method OK 0.9.3
  30. bug0023.pp tests handling of self pointer in nested methods OK 0.9.3
  31. bug0025.pp tests for a wrong uninit. var. warning OK 0.9.3
  32. bug0026.pp tests for a wrong unused. var. warning OK 0.9.4
  33. bug0027.pp tests
  34. type
  35. enumtype = (One, two, three, forty:=40, fifty); OK 0.9.5
  36. bug0028.pp type enumtype = (a); writeln(ord(a));
  37. bug0029.pp tests typeof(object type) OK 0.99.1 (FK)
  38. bug0030.pp tests type conversations in typed consts OK 0.9.6
  39. bug0031.pp tests array[boolean] of .... OK 0.9.8
  40. bug0032.pp tests for a bug with the stack OK 0.9.9
  41. bug0033.pp tests var p : pchar; begin p:='c'; end. OK 0.9.9
  42. bug0034.pp shows wrong line numbering when asmbler is parsed OK 0.9.9
  43. in direct mode.
  44. bug0035.pp label at end of block gives error OK 0.9.9 (FK)
  45. bug0036.pp assigning a single character to array of char ?OK 0.9.9
  46. gives a protection error
  47. --------- cgi386.pas gives out gpf's when compiling the system OK 0.9.9 (FK)
  48. unit.
  49. bug0037.pp tests missing graph.setgraphmode OK RTL (FK)
  50. bug0038.pp tests const ps : ^string = nil; OK 0.9.9 (FK)
  51. bug0039.pp shows the else-else problem OK 0.9.9 (FK)
  52. bug0040.pp shows the if b1 xor b2 problem where b1,b2 :boolean OK 0.9.9 (FK)
  53. bug0041.pp shows the if then end. problem OK 0.9.9 (FK)
  54. bug0042.pp shows assembler double operator expression problem OK 0.99.7 (PFV)
  55. bug0043.pp shows assembler nasm output fpu opcodes problem OK 0.99.6 (PFV)
  56. bug0044.pp shows $ifdef and comment nesting/directive problem OK 0.99.1 (PFV)
  57. bug0045.pp shows problem with virtual private methods OK 0.9.9 (FK)
  58. (might not be a true bug but more of an incompatiblity?)
  59. the compiler warns now if there is a private and virtual
  60. method
  61. bug0046.pp problems with sets with values over 128 due to OK 0.99.1 (FK)
  62. sign extension
  63. (already fixed ) but also for SET_IN_BYTE
  64. bug0047.pp compiling with -So crashes the compiler OK 0.99.1 (CEC)
  65. bug0049.pp shows an error while defining subrange types OK 0.99.7 (PFV)
  66. bug0050.pp can't set a function result in a nested procedure of a function OK 0.99.7 (PM)
  67. bug0051.pp Graph, shows a problem with putpixel OK 0.99.9 (PM)
  68. bug0052.pp Graph, collects missing graph unit routines OK 0.99.9 (PM)
  69. bug0053.pp shows a problem with open arrays OK 0.99.1 (FK)
  70. (crashes a win95-DOS box :) )
  71. bug0054.pp wordbool and longbool types are missed OK 0.99.6 (PFV)
  72. bug0055.pp internal error 10 (means too few registers OK 0.99.1 (FK)
  73. - i386 ONLY)
  74. bug0056.pp shows a _very_ simple expression which generates OK 0.99.1 (FK)
  75. wrong assembler
  76. bug0057.pp Graph, shows a crash with switch graph/text/graph OK 0.99.9 (PM)
  77. bug0058.pp causes an internal error 10 (problem with getregisterOK 0.99.1 (FK)
  78. in secondsmaller - i386 ONLY)
  79. bug0059.pp shows the problem with syntax error with ordinal OK 0.99.1 (FK)
  80. constants
  81. bug0060.pp shows missing type checking for case statements OK 0.99.1 (CEC)
  82. bug0061.pp shows wrong errors when compiling (NOT A BUG) OK 0.99.1
  83. bug0062.pp shows illegal type conversion for boolean OK 0.99.6 (PFV)
  84. bug0063.pp shows problem with ranges in sets for variables OK 0.99.7 (PFV)
  85. bug0064.pp shows other types of problems with case statements OK 0.99.1 (FK)
  86. bug0065.pp shows that frac() doesn't work correctly. OK 0.99.1 (PFV)
  87. bug0066.pp shows that Round doesn't work correctly. (NOT A BUG) OK 0.99.1
  88. bug0067.pp and bug0067b.pp (Work together) OK 0.99.1
  89. Shows incorrect symbol resolution when using uses in implementation
  90. More info can be found in file bug0067b.pp.
  91. bug0068.pp Shows incorrect type of ofs() OK 0.99.1 (PFV and FK)
  92. bug0069.pp Shows problem with far qualifier in units OK 0.99.1 (CEC)
  93. bug0070.pp shows missing include and exclude from rtl OK 0.99.6 (MVC)
  94. bug0071.pp shows that an unterminated constant string in a OK 0.99.1 (PFV)
  95. writeln() statement crashes the compiler.
  96. bug0072.pp causes an internal error 10 ( i386 ONLY ) OK 0.99.1 (FK)
  97. bug0073.pp shows incompatiblity with bp for distance qualifiers OK 0.99.6 (PFV)
  98. bug0074.pp shows MAJOR bug when trying to compile valid code OK 0.99.1 (PM/CEC)
  99. bug0075.pp shows invalid pchar output to console OK 0.99.1
  100. ---------- compiling pp -Us -di386 -Sg system.pp gives GPF OK 0.99.1
  101. bug0076.pp Bug in intel asm generator. was already fixed OK 0.99.1 (FK)
  102. bug0077.pp shows a bug with absolute in interface part of unit OK 0.99.1 (FK)
  103. bug0077b.pp used by unit bug0077.pp
  104. bug0078.pp Shows problems with longint constant in intel asm OK 0.99.1 (CEC)
  105. parsers
  106. bug0079.pp Shows problems with stackframe with assembler keyword OK 0.99.1 (CEC)
  107. bug0080.pp Shows Missing High() (internal) function. OK 0.99.6 (MVC)
  108. bug0081.pp Shows incompatibility with borland's 'array of char'. OK 0.99.1 (FK)
  109. bug0082.pp Shows incompatibility with BP : Multiple destructors. OK 0.99.1 (FK)
  110. bug0083.pp shows missing "dynamic" set constructor OK 0.99.7 (PFV)
  111. bug0084.pp no more pascal type checking OK 0.99.1 (FK)
  112. bug0085.pp shows runerror 216 OK 0.99.1 (CEC)
  113. bug0086.pp shows runerror 216 OK 0.99.1 (CEC)
  114. bug0087.pp shows internal error 12 - no more SegFaults OK 0.99.1 (FK)
  115. bug0088.pp internal error 12 or Runerror 216 OK 0.99.1 (FK)
  116. bug0089.pp internal error 12 or Runerror 216 OK 0.99.1 (FK)
  117. bug0090.pp shows PChar comparison problem OK 0.99.7 (PFV)
  118. bug0091.pp missing standard functions in constant expressions OK 0.99.7 (PFV)
  119. bug0092.pp The unfixable bug. Maybe we find a solution one day. OK 0.99.6 (FK)
  120. bug0093.pp Two Cardinal type bugs 0K 0.99.1 (FK/MvC)
  121. bug0094.pp internal error when recordtype not found with case OK 0.99.1
  122. bug0095.pp case with ranges starting with #0 bugs OK 0.99.1 (FK)
  123. bug0096.pp problem with objects as parameters OK 0.99.6 (PM)
  124. bug0097.pp two errors in bp7 but not in FPC OK 0.99.6 (FK)
  125. bug0098.pp File type casts are not allowed (works in TP7) OK 0.99.1 (FK)
  126. bug0099.pp wrong assembler code is genereatoed for range check OK 0.99.1 (?)
  127. (at least under 0.99.0)
  128. bug0100.pp a unit may only occure once in uses OK 0.99.6 (PM)
  129. bug0101.pp no type checking for routines in interfance and OK 0.99.1 (CEC)
  130. implementation
  131. bug0102.pp page fault when trying to compile under ppcm68k OK 0.99.1
  132. bug0103.pp problems with boolean typecasts (other type) OK 0.99.6 (PFV)
  133. bug0104.pp cardinal greater than $7fffffff aren't written OK 0.99.1 (FK)
  134. correct
  135. bug0105.pp typecasts are now ignored problem (NOT A BUG) OK 0.99.1
  136. bug0106.pp typecasts are now ignored problem (NOT A BUG) OK 0.99.1
  137. bug0107.pp shows page fault problem (run in TRUE DOS mode) OK ??.??
  138. bug0108.pp gives wrong error message OK 0.99.1 (PFV)
  139. bug0109.pp syntax error not detected when using a set as pointer OK 0.99.1 (FK)
  140. bug0110.pp SigSegv when using undeclared var in Case OK 0.99.6 (PFV)
  141. bug0112.pp still generates an internal error 10 OK 0.99.1 (FK)
  142. bug0113.pp point initialization problems OK 0.99.1 (PM/FK)
  143. bug0114.pp writeln problem (by Pavel Ozerski) OK 0.99.1 (PFV)
  144. bug0115.pp missing writeln for comp data type OK 0.99.6 (FK)
  145. bug0116.pp when local variable size is > $ffff, enter can't be OK 0.99.1 (FK)
  146. used to create the stack frame, but it is with -Og
  147. bug0117.pp internalerror 17 (and why is there an automatic float OK 0.99.6 (FK)
  148. conversion?)
  149. bug0118.pp Procedural vars cannot be assigned nil ? OK 0.99.6 (FK)
  150. bug0119.pp problem with methods OK 0.99.6 (FK)
  151. bug0120.pp inc/dec(enumeration) doesn't work OK 0.99.6 (MVC)
  152. bug0121.pp cardinal -> byte conversion not work (and crashes) OK 0.99.6 (FK)
  153. bug0122.pp exit() gives a warning that the result is not set OK 0.99.6 (FK)
  154. bug0125.pp wrong colors with DOS CRT unit OK 0.99.6 (PFV)
  155. bug0126.pp packed array isn't allowed OK 0.99.6 (FK)
  156. bug0127.pp problem with cdecl in implementation part OK 0.99.7 (PFV)
  157. bug0128.pp problem with ^[ OK 0.99.6 (PFV)
  158. bug0129.pp endless loop with while/continue OK 0.99.6 (FK)
  159. bug0130.pp in [..#255] problem OK 0.99.6 (PFV)
  160. bug0131.pp internal error 10 with highdimension arrays OK 0.99.6 (MVC)
  161. bug0132.pp segmentation fault with type loop OK 0.99.7 (FK)
  162. bug0134.pp 'continue' keyword is buggy. OK 0.99.6 (FK)
  163. bug0135.pp Unsupported subrange type construction. OK 0.99.6
  164. bug0136.pp No types necessary in the procedure header OK 0.99.6 (PFV)
  165. bug0137.pp Cannot assign child object variable to parent objcet type variable OK 0.99.6
  166. bug0138.pp with problem, %esi can be crushed and is not restored OK 0.99.6 (PM)
  167. bug0139.pp Cannot access protected method of ancestor class from other unit. OK 0.99.6
  168. bug0140.pp Shows that interdependent units still are not OK. OK 0.99.6 (PFV)
  169. bug0141.pp Wrong Class sizes when using forwardly defined classes. OK 0.99.6
  170. bug0142.pp sizeof(object) is not tp7 compatible when no constructor is used OK 0.99.9 (PM)
  171. bug0143.pp cannot concat string and array of char in $X+ mode OK 0.99.7 (PFV)
  172. bug0144.pp problem with 'with object do' OK 0.99.7 (PFV)
  173. bug0145.pp typed files with huges records (needs filerec.size:longint) OK 0.99.7 (PFV)
  174. bug0146.pp no sizeof() for var arrays and the size is pushed incorrect OK 0.99.7 (PFV)
  175. bug0147.pp function b; is not allowed in implementation OK 0.99.7 (PFV)
  176. bug0148.pp crash when setting function result of a declared but not yet OK 0.99.7 (PFV)
  177. implemented function in another function
  178. bug0149.pp (a, b) compile bug0149b twice and you'll get a crash OK 0.99.7 (PFV)
  179. bug0150.pp Shows that the assert() macro is missing under Delphi OK 0.99.9 (PFV)
  180. bug0151.pp crash when using undeclared variable in withstatement OK 0.99.7 (PFV)
  181. bug0152.pp End value of loop variable must be calculated before loop
  182. variable is initialized. OK 0.99.11 (PM)
  183. bug0153.pp Asm, indexing a local/para var should produce an error like tp7 OK 0.99.9 (PFV)
  184. bug0154.pp Subrange types give type mismatch when assigning to OK 0.99.7 (PFV)
  185. bug0156.pp (a,b) forward type def in record crashes when loading ppu OK 0.99.7 (PM/PFV)
  186. bug0155.pp Asm, Missing string return for asm functions
  187. (this is a feature rather than a bug : OK 0.99.11 (FK)
  188. complex return values are not allowed for assembler
  189. functions (PM) Why not (FK)? )
  190. bug0157.pp Invalid compilation and also crashes OK 0.99.7 (PFV)
  191. bug0158.pp Invalid boolean typecast OK 0.99.7 (PFV)
  192. bug0159.pp Invalid virtual functions - should compile OK 0.99.7 (FK)
  193. bug0160.pp Incompatibility with BP: Self shouldn't be a reserved word. OK 0.99.9 (PM)
  194. bug0161.pp internal error when trying to create a set with another OK 0.99.9 (PFV)
  195. bug0162.pp continue in repeat ... until loop doesn't work correct OK 0.99.8 (PFV)
  196. bug0163.pp missing <= and >= operators for sets. OK 0.99.11 (JM)
  197. bug0164.pp crash when using undeclared array index in with statement OK 0.99.8 (PFV)
  198. bug0165.pp missing range check code for enumerated types. OK 0.99.9 (PFV)
  199. bug0166.pp forward type used in declaration crashes instead of error OK 0.99.9 (PFV)
  200. bug0167.pp crash when declaring a procedure with same name as object OK 0.99.9 (PFV)
  201. bug0168.pp set:=set+element is allowed (should be: set:=set+[element]) OK 0.99.9 (PFV)
  202. bug0169.pp missing new(type) support for not object/class OK 0.99.9 (PM)
  203. bug0170.pp Asm, {$ifdef} is seen as a separator OK 0.99.9 (PFV)
  204. bug0171.pp missing typecasting in constant expressions
  205. solved for pointers OK 0.99.11 (PM)
  206. bug0172.pp with with absolute seg:ofs should not be possible OK 0.99.9 (PM)
  207. bug0173.pp secondbug is parsed as asm, but should be normal pascalcode OK 0.99.9 (PFV)
  208. bug0174.pp Asm, offsets of fields are not possible yet OK 0.99.9 (PFV)
  209. bug0175.pp Asm, mov word,%eax should not be allowed without casting
  210. emits a warning (or error with range checking enabled) OK 0.99.11 (PM)
  211. bug0176.pp unit.symbol not allowed for implementation vars OK 0.99.9 (PM)
  212. bug0177.pp program.symbol not allowed (almost the same as bug 176) OK 0.99.9 (PM)
  213. bug0178.pp problems with undefined labels and fail outside constructor OK 0.99.9 (PM)
  214. bug0179.pp show a problem for -So mode OK 0.99.9 (PM)
  215. bug0180.pp problem for units with names different from file name
  216. should be accepted with -Un !!
  217. Solved, but you still need to use the file name from other
  218. units OK 0.99.9 (PM)
  219. bug0181.pp shows a problem with name mangling OK 0.99.9 (PM)
  220. bug0182.pp @record.field doesn't work in constant expr OK 0.99.9 (PM)
  221. bug0183.pp internal error 10 in secondnot OK 0.99.11 (PM)
  222. bug0184.pp multiple copies of the same constant set are stored in executable OK 0.99.9 (PFV)
  223. bug0186.pp Erroneous array syntax is accepted. OK 0.99.9 (PFV)
  224. bug0187.pp constructor in a WIth statement isn't called correct.
  225. (works at lest in the case stated) OK 0.99.11 (PM)
  226. bug0188.pp can't print function result of procedural var that returns a
  227. function. Not a bug : wrong syntax !! See source (PM)
  228. bug0189.pp cant compare adresses of function variables !!
  229. As bug0188 FPC syntax problem see source (PM)
  230. bug0190.pp can't have typecast for var params ?? OK 0.99.11 (PM)
  231. bug0191.pp missing vecn constant evaluation OK 0.99.11 (PM)
  232. bug0192.pp can't compare boolean result with true/false, because the
  233. boolean result is already in the flags OK 0.99.11 (PFV)
  234. bug0194.pp @procedure var returns value in it instead of address !! OK 0.99.11 (PM)
  235. bug0195.pp Problem with Getimage, crash of DOS box, even with dpmiexcp!! (PFV)
  236. Not a bug, you must use p^.
  237. bug0196.pp "function a;" is accepted (should require result type) OK 0.99.1 (PM)
  238. bug0197.pp should produce an error: problem with c1:=c2<c3 where c? is OK 0.99.11 (PM)
  239. a comp type
  240. bug0199.pp bug in mul code OK 0.99.11 (FK)
  241. bug0201.pp problem with record var-parameters and assembler OK 0.99.11 (PFV)
  242. bug0203.pp problem with changed mangledname of procedures after use
  243. Generates an error now OK 0.99.11 (PM)
  244. bug0204.pp can typecast the result var in an assignment OK 0.99.11 (PM)
  245. bug0205.pp and parsing bug, generates wrong code (tp7 gives parser error) OK 0.99.11 (PM)
  246. bug0206.pp sets with variable ranges doesn't work OK 0.99.11 (PFV)
  247. bug0207.pp a class destructor doesn't release the memory OK 0.99.11 (FK)
  248. bug0208.pp implicit conversion from boolean to longint should not be allowed
  249. (this is the reason of bug0205 !) OK 0.99.11 (PM)
  250. bug0209.pp problem with boolean expressions of different store sizes
  251. (problem created while solving bug205 ! PM) OK 0.99.11 (PM)
  252. bug0210.pp fillchar should accept boolean value also !! OK 0.99.11 (PM)
  253. bug0211.pp a and not a is true !!! (if a:=boolean(5)) OK 0.99.11 (PM)
  254. bug0213.pp name mangling problem with nested procedures in overloaded
  255. procedure OK 0.99.11 (PM)
  256. bug0214.pp bug for static methods OK 0.99.11 (PM)
  257. bug0215.pp more bugs with static methods OK 0.99.11 (PM)
  258. bug0216.pp problem with with fields as function args OK 0.99.11 (PM)
  259. bug0219.pp wrong error message OK 0.99.11 (PFV)
  260. Unproducable bugs:
  261. ------------------
  262. bug0048.pp shows a problem with putimage on some computers
  263. (I can't reproduce the bug neither with a Millenium II
  264. nor a Trio64 card (FK) )
  265. (maybe fixed : there was a problem in SetVESAmode for cards
  266. that use a different read and write window !!
  267. 0.99.9 (PM) )
  268. Unfixed not important bugs (mostly incompatibilities):
  269. ------------------------------------------------------
  270. bug0111.pp blockread(typedfile,...) is not allowed in TP7
  271. bug0133.pp object type declaration not 100% compatibile with TP7
  272. bug0193.pp overflow checking for 8 and 16 bit operations wrong
  273. overflow are just special range checks so
  274. as all operations are done on 32 bit integers in FPC
  275. overflow checking will only trap 32 bit overflow
  276. you have to use range checks for byte or 16 bit integers
  277. Unfixed bugs:
  278. -------------
  279. bug0123.pp Asm, problem with intel assembler (shrd)
  280. bug0124.pp Asm, problem with -Rintel switch and indexing (whatever the order)
  281. bug0185.pp missing range checking for Val and subrange types
  282. bug0198.pp calling specifications aren't allowed in class declarations,
  283. this should be allowed
  284. bug0200.pp array of char overloading problem with strings
  285. bug0202.pp flag results not supported with case
  286. bug0212.pp problem with properties
  287. bug0217.pp in tp mode can't use the procvar in writeln
  288. bug0218.pp rounding errors with write/str (the bug is fixed, but there
  289. is still some rounding error left when writing the extended
  290. value PFV)
  291. bug0220.pp can't choose overload with array of char
  292. bug0221.pp syntax parsing incompatibilities with tp7
  293. 1.pp produces a linker error under win32, sorry for the filename
  294. but the filename is the bug :)
  295. bug0222.pp an record field can't be the counter index (compiles with TP)
  296. bug0223.pp wrong boolean evaluation in writeln
  297. bug0224.pp I/O-Error generation in readln can't be switched off
  298. bug0225.pp Sigsegv when run with range checks on open arrays