Parcourir la source

* updated program/script to generate all variant overload tests to merge
most tests which have to succeed (except the extended ones, as they
have to succeed on some and fail on other platforms) in a single file
to speed up testing (the ivarol*.pp files can also still be compiled
separately, but the testsuite will only compile the tnofalvarol
program which includes them all)

git-svn-id: trunk@8947 -

Jonas Maebe il y a 18 ans
Parent
commit
c1cbd8a949
100 fichiers modifiés avec 5450 ajouts et 145 suppressions
  1. 134 133
      .gitattributes
  2. 54 0
      tests/test/cg/variants/ivarol10.pp
  3. 54 0
      tests/test/cg/variants/ivarol100.pp
  4. 54 0
      tests/test/cg/variants/ivarol101.pp
  5. 54 0
      tests/test/cg/variants/ivarol102.pp
  6. 54 0
      tests/test/cg/variants/ivarol104.pp
  7. 54 0
      tests/test/cg/variants/ivarol105.pp
  8. 54 0
      tests/test/cg/variants/ivarol106.pp
  9. 54 0
      tests/test/cg/variants/ivarol107.pp
  10. 54 0
      tests/test/cg/variants/ivarol108.pp
  11. 54 0
      tests/test/cg/variants/ivarol109.pp
  12. 54 0
      tests/test/cg/variants/ivarol11.pp
  13. 54 0
      tests/test/cg/variants/ivarol110.pp
  14. 54 0
      tests/test/cg/variants/ivarol111.pp
  15. 54 0
      tests/test/cg/variants/ivarol112.pp
  16. 54 0
      tests/test/cg/variants/ivarol113.pp
  17. 54 0
      tests/test/cg/variants/ivarol115.pp
  18. 54 0
      tests/test/cg/variants/ivarol116.pp
  19. 54 0
      tests/test/cg/variants/ivarol118.pp
  20. 54 0
      tests/test/cg/variants/ivarol119.pp
  21. 54 0
      tests/test/cg/variants/ivarol120.pp
  22. 54 0
      tests/test/cg/variants/ivarol121.pp
  23. 54 0
      tests/test/cg/variants/ivarol122.pp
  24. 54 0
      tests/test/cg/variants/ivarol123.pp
  25. 54 0
      tests/test/cg/variants/ivarol125.pp
  26. 54 0
      tests/test/cg/variants/ivarol126.pp
  27. 54 0
      tests/test/cg/variants/ivarol127.pp
  28. 54 0
      tests/test/cg/variants/ivarol128.pp
  29. 54 0
      tests/test/cg/variants/ivarol129.pp
  30. 54 0
      tests/test/cg/variants/ivarol130.pp
  31. 54 0
      tests/test/cg/variants/ivarol131.pp
  32. 54 0
      tests/test/cg/variants/ivarol132.pp
  33. 54 0
      tests/test/cg/variants/ivarol134.pp
  34. 54 0
      tests/test/cg/variants/ivarol135.pp
  35. 54 0
      tests/test/cg/variants/ivarol136.pp
  36. 54 0
      tests/test/cg/variants/ivarol137.pp
  37. 54 0
      tests/test/cg/variants/ivarol138.pp
  38. 54 0
      tests/test/cg/variants/ivarol139.pp
  39. 54 0
      tests/test/cg/variants/ivarol140.pp
  40. 54 0
      tests/test/cg/variants/ivarol141.pp
  41. 54 0
      tests/test/cg/variants/ivarol142.pp
  42. 54 0
      tests/test/cg/variants/ivarol143.pp
  43. 54 0
      tests/test/cg/variants/ivarol144.pp
  44. 54 0
      tests/test/cg/variants/ivarol145.pp
  45. 54 0
      tests/test/cg/variants/ivarol146.pp
  46. 54 0
      tests/test/cg/variants/ivarol147.pp
  47. 54 0
      tests/test/cg/variants/ivarol148.pp
  48. 54 0
      tests/test/cg/variants/ivarol149.pp
  49. 54 0
      tests/test/cg/variants/ivarol15.pp
  50. 54 0
      tests/test/cg/variants/ivarol150.pp
  51. 54 0
      tests/test/cg/variants/ivarol151.pp
  52. 54 0
      tests/test/cg/variants/ivarol152.pp
  53. 54 0
      tests/test/cg/variants/ivarol153.pp
  54. 54 0
      tests/test/cg/variants/ivarol155.pp
  55. 54 0
      tests/test/cg/variants/ivarol156.pp
  56. 54 0
      tests/test/cg/variants/ivarol158.pp
  57. 54 0
      tests/test/cg/variants/ivarol160.pp
  58. 54 0
      tests/test/cg/variants/ivarol161.pp
  59. 54 0
      tests/test/cg/variants/ivarol162.pp
  60. 54 0
      tests/test/cg/variants/ivarol164.pp
  61. 54 0
      tests/test/cg/variants/ivarol165.pp
  62. 54 0
      tests/test/cg/variants/ivarol166.pp
  63. 54 0
      tests/test/cg/variants/ivarol167.pp
  64. 54 0
      tests/test/cg/variants/ivarol169.pp
  65. 54 0
      tests/test/cg/variants/ivarol17.pp
  66. 54 0
      tests/test/cg/variants/ivarol170.pp
  67. 54 0
      tests/test/cg/variants/ivarol171.pp
  68. 54 0
      tests/test/cg/variants/ivarol18.pp
  69. 54 0
      tests/test/cg/variants/ivarol19.pp
  70. 24 12
      tests/test/cg/variants/ivarol2.pp
  71. 54 0
      tests/test/cg/variants/ivarol21.pp
  72. 54 0
      tests/test/cg/variants/ivarol22.pp
  73. 54 0
      tests/test/cg/variants/ivarol23.pp
  74. 54 0
      tests/test/cg/variants/ivarol24.pp
  75. 54 0
      tests/test/cg/variants/ivarol25.pp
  76. 54 0
      tests/test/cg/variants/ivarol26.pp
  77. 54 0
      tests/test/cg/variants/ivarol27.pp
  78. 54 0
      tests/test/cg/variants/ivarol28.pp
  79. 54 0
      tests/test/cg/variants/ivarol29.pp
  80. 54 0
      tests/test/cg/variants/ivarol32.pp
  81. 54 0
      tests/test/cg/variants/ivarol34.pp
  82. 54 0
      tests/test/cg/variants/ivarol35.pp
  83. 54 0
      tests/test/cg/variants/ivarol36.pp
  84. 54 0
      tests/test/cg/variants/ivarol37.pp
  85. 54 0
      tests/test/cg/variants/ivarol38.pp
  86. 54 0
      tests/test/cg/variants/ivarol39.pp
  87. 54 0
      tests/test/cg/variants/ivarol40.pp
  88. 54 0
      tests/test/cg/variants/ivarol41.pp
  89. 54 0
      tests/test/cg/variants/ivarol42.pp
  90. 54 0
      tests/test/cg/variants/ivarol43.pp
  91. 54 0
      tests/test/cg/variants/ivarol44.pp
  92. 54 0
      tests/test/cg/variants/ivarol45.pp
  93. 54 0
      tests/test/cg/variants/ivarol46.pp
  94. 54 0
      tests/test/cg/variants/ivarol47.pp
  95. 54 0
      tests/test/cg/variants/ivarol49.pp
  96. 54 0
      tests/test/cg/variants/ivarol50.pp
  97. 54 0
      tests/test/cg/variants/ivarol52.pp
  98. 54 0
      tests/test/cg/variants/ivarol53.pp
  99. 54 0
      tests/test/cg/variants/ivarol54.pp
  100. 54 0
      tests/test/cg/variants/ivarol55.pp

+ 134 - 133
.gitattributes

@@ -6654,177 +6654,178 @@ tests/test/cg/ttryfin3.pp svneol=native#text/plain
 tests/test/cg/ttryfin4.pp svneol=native#text/plain
 tests/test/cg/tvec.pp svneol=native#text/plain
 tests/test/cg/uprintf3.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol10.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol100.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol101.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol102.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol104.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol105.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol106.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol107.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol108.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol109.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol11.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol110.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol111.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol112.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol113.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol115.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol116.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol118.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol119.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol120.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol121.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol122.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol123.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol125.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol126.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol127.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol128.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol129.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol130.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol131.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol132.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol134.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol135.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol136.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol137.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol138.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol139.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol140.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol141.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol142.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol143.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol144.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol145.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol146.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol147.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol148.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol149.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol15.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol150.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol151.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol152.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol153.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol155.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol156.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol158.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol160.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol161.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol162.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol164.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol165.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol166.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol167.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol169.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol17.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol170.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol171.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol18.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol19.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol2.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol21.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol22.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol23.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol24.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol25.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol26.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol27.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol28.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol29.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol32.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol34.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol35.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol36.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol37.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol38.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol39.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol40.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol41.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol42.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol43.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol44.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol45.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol46.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol47.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol49.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol50.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol52.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol53.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol54.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol55.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol56.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol57.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol58.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol59.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol60.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol63.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol65.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol66.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol68.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol69.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol70.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol71.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol72.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol73.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol74.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol75.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol76.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol77.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol79.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol80.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol81.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol83.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol85.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol86.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol87.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol88.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol89.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol90.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol92.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol93.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol95.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol97.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol98.pp svneol=native#text/plain
+tests/test/cg/variants/ivarol99.pp svneol=native#text/plain
+tests/test/cg/variants/tnofalvarol.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol1.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol10.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol100.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol101.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol102.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol103.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol104.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol105.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol106.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol107.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol108.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol109.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol11.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol110.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol111.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol112.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol113.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol114.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol115.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol116.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol117.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol118.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol119.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol12.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol120.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol121.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol122.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol123.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol124.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol125.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol126.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol127.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol128.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol129.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol13.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol130.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol131.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol132.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol133.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol134.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol135.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol136.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol137.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol138.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol139.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol14.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol140.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol141.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol142.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol143.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol144.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol145.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol146.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol147.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol148.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol149.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol15.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol150.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol151.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol152.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol153.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol154.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol155.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol156.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol157.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol158.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol159.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol16.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol160.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol161.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol162.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol163.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol164.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol165.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol166.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol167.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol168.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol169.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol17.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol170.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol171.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol18.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol19.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol2.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol20.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol21.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol22.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol23.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol24.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol25.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol26.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol27.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol28.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol29.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol3.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol30.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol31.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol32.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol33.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol34.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol35.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol36.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol37.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol38.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol39.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol4.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol40.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol41.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol42.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol43.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol44.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol45.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol46.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol47.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol48.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol49.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol5.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol50.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol51.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol52.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol53.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol54.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol55.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol56.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol57.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol58.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol59.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol6.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol60.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol61.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol62.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol63.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol64.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol65.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol66.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol67.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol68.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol69.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol7.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol70.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol71.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol72.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol73.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol74.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol75.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol76.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol77.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol78.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol79.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol8.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol80.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol81.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol82.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol83.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol84.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol85.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol86.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol87.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol88.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol89.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol9.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol90.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol91.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol92.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol93.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol94.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol95.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol96.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol97.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol98.pp svneol=native#text/plain
-tests/test/cg/variants/tvarol99.pp svneol=native#text/plain
 tests/test/dumpclass.pp svneol=native#text/plain
 tests/test/dumpmethods.pp svneol=native#text/plain
 tests/test/opt/README -text

+ 54 - 0
tests/test/cg/variants/ivarol10.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp10 = double;
+{$else FPC_COMP_IS_INT64}
+  comp10 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test10(var a); overload;
+  begin
+    writeln('formal called instead of shortstring');
+  end;
+
+procedure test10(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of formal');
+    halt(1)
+  end;
+
+var
+  x10: longint;
+
+  y10: shortstring;
+procedure dotest10;
+var
+  v: variant;
+
+begin
+  try
+    v := x10;
+    test10(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y10;
+    test10(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest10;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol100.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp100 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp100 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test100(a: word); overload;
+  begin
+    writeln('word called instead of double');
+  end;
+
+procedure test100(a: double); overload;
+  begin
+    writeln('double called instead of word');
+    halt(1)
+  end;
+
+var
+  x100: word;
+
+  y100: double;
+procedure dotest100;
+var
+  v: variant;
+
+begin
+  try
+    v := x100;
+    test100(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y100;
+    test100(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest100;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol101.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp101 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp101 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test101(a: word); overload;
+  begin
+    writeln('word called instead of extended');
+  end;
+
+procedure test101(a: extended); overload;
+  begin
+    writeln('extended called instead of word');
+    halt(1)
+  end;
+
+var
+  x101: word;
+
+  y101: extended;
+procedure dotest101;
+var
+  v: variant;
+
+begin
+  try
+    v := x101;
+    test101(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y101;
+    test101(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest101;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol102.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp102 = double;
+{$else FPC_COMP_IS_INT64}
+  comp102 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test102(a: word); overload;
+  begin
+    writeln('word called instead of char');
+  end;
+
+procedure test102(a: char); overload;
+  begin
+    writeln('char called instead of word');
+    halt(1)
+  end;
+
+var
+  x102: word;
+
+  y102: char;
+procedure dotest102;
+var
+  v: variant;
+
+begin
+  try
+    v := x102;
+    test102(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y102;
+    test102(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest102;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol104.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp104 = double;
+{$else FPC_COMP_IS_INT64}
+  comp104 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test104(a: word); overload;
+  begin
+    writeln('word called instead of widestring');
+  end;
+
+procedure test104(a: widestring); overload;
+  begin
+    writeln('widestring called instead of word');
+    halt(1)
+  end;
+
+var
+  x104: word;
+
+  y104: widestring;
+procedure dotest104;
+var
+  v: variant;
+
+begin
+  try
+    v := x104;
+    test104(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y104;
+    test104(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest104;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol105.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp105 = double;
+{$else FPC_COMP_IS_INT64}
+  comp105 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test105(a: word); overload;
+  begin
+    writeln('word called instead of widechar');
+  end;
+
+procedure test105(a: widechar); overload;
+  begin
+    writeln('widechar called instead of word');
+    halt(1)
+  end;
+
+var
+  x105: word;
+
+  y105: widechar;
+procedure dotest105;
+var
+  v: variant;
+
+begin
+  try
+    v := x105;
+    test105(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y105;
+    test105(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest105;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol106.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp106 = double;
+{$else FPC_COMP_IS_INT64}
+  comp106 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test106(a: smallint); overload;
+  begin
+    writeln('smallint called instead of byte');
+    halt(1)
+  end;
+
+procedure test106(a: byte); overload;
+  begin
+    writeln('byte called instead of smallint');
+  end;
+
+var
+  x106: smallint;
+
+  y106: byte;
+procedure dotest106;
+var
+  v: variant;
+
+begin
+  try
+    v := x106;
+    test106(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y106;
+    test106(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest106;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol107.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp107 = double;
+{$else FPC_COMP_IS_INT64}
+  comp107 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test107(a: smallint); overload;
+  begin
+    writeln('smallint called instead of shortint');
+    halt(1)
+  end;
+
+procedure test107(a: shortint); overload;
+  begin
+    writeln('shortint called instead of smallint');
+  end;
+
+var
+  x107: smallint;
+
+  y107: shortint;
+procedure dotest107;
+var
+  v: variant;
+
+begin
+  try
+    v := x107;
+    test107(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y107;
+    test107(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest107;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol108.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp108 = double;
+{$else FPC_COMP_IS_INT64}
+  comp108 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test108(a: smallint); overload;
+  begin
+    writeln('smallint called instead of shortstring');
+  end;
+
+procedure test108(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of smallint');
+    halt(1)
+  end;
+
+var
+  x108: smallint;
+
+  y108: shortstring;
+procedure dotest108;
+var
+  v: variant;
+
+begin
+  try
+    v := x108;
+    test108(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y108;
+    test108(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest108;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol109.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp109 = double;
+{$else FPC_COMP_IS_INT64}
+  comp109 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test109(a: smallint); overload;
+  begin
+    writeln('smallint called instead of ansistring');
+  end;
+
+procedure test109(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of smallint');
+    halt(1)
+  end;
+
+var
+  x109: smallint;
+
+  y109: ansistring;
+procedure dotest109;
+var
+  v: variant;
+
+begin
+  try
+    v := x109;
+    test109(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y109;
+    test109(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest109;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol11.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp11 = double;
+{$else FPC_COMP_IS_INT64}
+  comp11 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test11(var a); overload;
+  begin
+    writeln('formal called instead of ansistring');
+  end;
+
+procedure test11(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of formal');
+    halt(1)
+  end;
+
+var
+  x11: longint;
+
+  y11: ansistring;
+procedure dotest11;
+var
+  v: variant;
+
+begin
+  try
+    v := x11;
+    test11(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y11;
+    test11(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest11;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol110.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp110 = double;
+{$else FPC_COMP_IS_INT64}
+  comp110 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test110(a: smallint); overload;
+  begin
+    writeln('smallint called instead of single');
+  end;
+
+procedure test110(a: single); overload;
+  begin
+    writeln('single called instead of smallint');
+    halt(1)
+  end;
+
+var
+  x110: smallint;
+
+  y110: single;
+procedure dotest110;
+var
+  v: variant;
+
+begin
+  try
+    v := x110;
+    test110(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y110;
+    test110(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest110;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol111.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp111 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp111 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test111(a: smallint); overload;
+  begin
+    writeln('smallint called instead of double');
+  end;
+
+procedure test111(a: double); overload;
+  begin
+    writeln('double called instead of smallint');
+    halt(1)
+  end;
+
+var
+  x111: smallint;
+
+  y111: double;
+procedure dotest111;
+var
+  v: variant;
+
+begin
+  try
+    v := x111;
+    test111(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y111;
+    test111(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest111;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol112.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp112 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp112 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test112(a: smallint); overload;
+  begin
+    writeln('smallint called instead of extended');
+  end;
+
+procedure test112(a: extended); overload;
+  begin
+    writeln('extended called instead of smallint');
+    halt(1)
+  end;
+
+var
+  x112: smallint;
+
+  y112: extended;
+procedure dotest112;
+var
+  v: variant;
+
+begin
+  try
+    v := x112;
+    test112(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y112;
+    test112(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest112;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol113.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp113 = double;
+{$else FPC_COMP_IS_INT64}
+  comp113 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test113(a: smallint); overload;
+  begin
+    writeln('smallint called instead of char');
+  end;
+
+procedure test113(a: char); overload;
+  begin
+    writeln('char called instead of smallint');
+    halt(1)
+  end;
+
+var
+  x113: smallint;
+
+  y113: char;
+procedure dotest113;
+var
+  v: variant;
+
+begin
+  try
+    v := x113;
+    test113(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y113;
+    test113(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest113;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol115.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp115 = double;
+{$else FPC_COMP_IS_INT64}
+  comp115 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test115(a: smallint); overload;
+  begin
+    writeln('smallint called instead of widestring');
+  end;
+
+procedure test115(a: widestring); overload;
+  begin
+    writeln('widestring called instead of smallint');
+    halt(1)
+  end;
+
+var
+  x115: smallint;
+
+  y115: widestring;
+procedure dotest115;
+var
+  v: variant;
+
+begin
+  try
+    v := x115;
+    test115(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y115;
+    test115(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest115;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol116.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp116 = double;
+{$else FPC_COMP_IS_INT64}
+  comp116 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test116(a: smallint); overload;
+  begin
+    writeln('smallint called instead of widechar');
+  end;
+
+procedure test116(a: widechar); overload;
+  begin
+    writeln('widechar called instead of smallint');
+    halt(1)
+  end;
+
+var
+  x116: smallint;
+
+  y116: widechar;
+procedure dotest116;
+var
+  v: variant;
+
+begin
+  try
+    v := x116;
+    test116(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y116;
+    test116(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest116;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol118.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp118 = double;
+{$else FPC_COMP_IS_INT64}
+  comp118 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test118(a: byte); overload;
+  begin
+    writeln('byte called instead of shortstring');
+  end;
+
+procedure test118(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of byte');
+    halt(1)
+  end;
+
+var
+  x118: byte;
+
+  y118: shortstring;
+procedure dotest118;
+var
+  v: variant;
+
+begin
+  try
+    v := x118;
+    test118(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y118;
+    test118(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest118;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol119.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp119 = double;
+{$else FPC_COMP_IS_INT64}
+  comp119 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test119(a: byte); overload;
+  begin
+    writeln('byte called instead of ansistring');
+  end;
+
+procedure test119(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of byte');
+    halt(1)
+  end;
+
+var
+  x119: byte;
+
+  y119: ansistring;
+procedure dotest119;
+var
+  v: variant;
+
+begin
+  try
+    v := x119;
+    test119(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y119;
+    test119(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest119;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol120.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp120 = double;
+{$else FPC_COMP_IS_INT64}
+  comp120 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test120(a: byte); overload;
+  begin
+    writeln('byte called instead of single');
+  end;
+
+procedure test120(a: single); overload;
+  begin
+    writeln('single called instead of byte');
+    halt(1)
+  end;
+
+var
+  x120: byte;
+
+  y120: single;
+procedure dotest120;
+var
+  v: variant;
+
+begin
+  try
+    v := x120;
+    test120(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y120;
+    test120(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest120;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol121.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp121 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp121 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test121(a: byte); overload;
+  begin
+    writeln('byte called instead of double');
+  end;
+
+procedure test121(a: double); overload;
+  begin
+    writeln('double called instead of byte');
+    halt(1)
+  end;
+
+var
+  x121: byte;
+
+  y121: double;
+procedure dotest121;
+var
+  v: variant;
+
+begin
+  try
+    v := x121;
+    test121(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y121;
+    test121(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest121;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol122.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp122 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp122 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test122(a: byte); overload;
+  begin
+    writeln('byte called instead of extended');
+  end;
+
+procedure test122(a: extended); overload;
+  begin
+    writeln('extended called instead of byte');
+    halt(1)
+  end;
+
+var
+  x122: byte;
+
+  y122: extended;
+procedure dotest122;
+var
+  v: variant;
+
+begin
+  try
+    v := x122;
+    test122(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y122;
+    test122(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest122;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol123.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp123 = double;
+{$else FPC_COMP_IS_INT64}
+  comp123 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test123(a: byte); overload;
+  begin
+    writeln('byte called instead of char');
+  end;
+
+procedure test123(a: char); overload;
+  begin
+    writeln('char called instead of byte');
+    halt(1)
+  end;
+
+var
+  x123: byte;
+
+  y123: char;
+procedure dotest123;
+var
+  v: variant;
+
+begin
+  try
+    v := x123;
+    test123(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y123;
+    test123(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest123;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol125.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp125 = double;
+{$else FPC_COMP_IS_INT64}
+  comp125 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test125(a: byte); overload;
+  begin
+    writeln('byte called instead of widestring');
+  end;
+
+procedure test125(a: widestring); overload;
+  begin
+    writeln('widestring called instead of byte');
+    halt(1)
+  end;
+
+var
+  x125: byte;
+
+  y125: widestring;
+procedure dotest125;
+var
+  v: variant;
+
+begin
+  try
+    v := x125;
+    test125(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y125;
+    test125(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest125;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol126.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp126 = double;
+{$else FPC_COMP_IS_INT64}
+  comp126 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test126(a: byte); overload;
+  begin
+    writeln('byte called instead of widechar');
+  end;
+
+procedure test126(a: widechar); overload;
+  begin
+    writeln('widechar called instead of byte');
+    halt(1)
+  end;
+
+var
+  x126: byte;
+
+  y126: widechar;
+procedure dotest126;
+var
+  v: variant;
+
+begin
+  try
+    v := x126;
+    test126(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y126;
+    test126(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest126;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol127.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp127 = double;
+{$else FPC_COMP_IS_INT64}
+  comp127 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test127(a: shortint); overload;
+  begin
+    writeln('shortint called instead of shortstring');
+  end;
+
+procedure test127(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of shortint');
+    halt(1)
+  end;
+
+var
+  x127: shortint;
+
+  y127: shortstring;
+procedure dotest127;
+var
+  v: variant;
+
+begin
+  try
+    v := x127;
+    test127(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y127;
+    test127(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest127;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol128.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp128 = double;
+{$else FPC_COMP_IS_INT64}
+  comp128 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test128(a: shortint); overload;
+  begin
+    writeln('shortint called instead of ansistring');
+  end;
+
+procedure test128(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of shortint');
+    halt(1)
+  end;
+
+var
+  x128: shortint;
+
+  y128: ansistring;
+procedure dotest128;
+var
+  v: variant;
+
+begin
+  try
+    v := x128;
+    test128(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y128;
+    test128(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest128;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol129.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp129 = double;
+{$else FPC_COMP_IS_INT64}
+  comp129 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test129(a: shortint); overload;
+  begin
+    writeln('shortint called instead of single');
+  end;
+
+procedure test129(a: single); overload;
+  begin
+    writeln('single called instead of shortint');
+    halt(1)
+  end;
+
+var
+  x129: shortint;
+
+  y129: single;
+procedure dotest129;
+var
+  v: variant;
+
+begin
+  try
+    v := x129;
+    test129(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y129;
+    test129(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest129;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol130.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp130 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp130 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test130(a: shortint); overload;
+  begin
+    writeln('shortint called instead of double');
+  end;
+
+procedure test130(a: double); overload;
+  begin
+    writeln('double called instead of shortint');
+    halt(1)
+  end;
+
+var
+  x130: shortint;
+
+  y130: double;
+procedure dotest130;
+var
+  v: variant;
+
+begin
+  try
+    v := x130;
+    test130(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y130;
+    test130(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest130;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol131.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp131 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp131 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test131(a: shortint); overload;
+  begin
+    writeln('shortint called instead of extended');
+  end;
+
+procedure test131(a: extended); overload;
+  begin
+    writeln('extended called instead of shortint');
+    halt(1)
+  end;
+
+var
+  x131: shortint;
+
+  y131: extended;
+procedure dotest131;
+var
+  v: variant;
+
+begin
+  try
+    v := x131;
+    test131(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y131;
+    test131(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest131;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol132.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp132 = double;
+{$else FPC_COMP_IS_INT64}
+  comp132 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test132(a: shortint); overload;
+  begin
+    writeln('shortint called instead of char');
+  end;
+
+procedure test132(a: char); overload;
+  begin
+    writeln('char called instead of shortint');
+    halt(1)
+  end;
+
+var
+  x132: shortint;
+
+  y132: char;
+procedure dotest132;
+var
+  v: variant;
+
+begin
+  try
+    v := x132;
+    test132(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y132;
+    test132(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest132;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol134.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp134 = double;
+{$else FPC_COMP_IS_INT64}
+  comp134 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test134(a: shortint); overload;
+  begin
+    writeln('shortint called instead of widestring');
+  end;
+
+procedure test134(a: widestring); overload;
+  begin
+    writeln('widestring called instead of shortint');
+    halt(1)
+  end;
+
+var
+  x134: shortint;
+
+  y134: widestring;
+procedure dotest134;
+var
+  v: variant;
+
+begin
+  try
+    v := x134;
+    test134(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y134;
+    test134(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest134;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol135.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp135 = double;
+{$else FPC_COMP_IS_INT64}
+  comp135 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test135(a: shortint); overload;
+  begin
+    writeln('shortint called instead of widechar');
+  end;
+
+procedure test135(a: widechar); overload;
+  begin
+    writeln('widechar called instead of shortint');
+    halt(1)
+  end;
+
+var
+  x135: shortint;
+
+  y135: widechar;
+procedure dotest135;
+var
+  v: variant;
+
+begin
+  try
+    v := x135;
+    test135(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y135;
+    test135(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest135;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol136.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp136 = double;
+{$else FPC_COMP_IS_INT64}
+  comp136 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test136(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of ansistring');
+  end;
+
+procedure test136(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of shortstring');
+    halt(1)
+  end;
+
+var
+  x136: shortstring;
+
+  y136: ansistring;
+procedure dotest136;
+var
+  v: variant;
+
+begin
+  try
+    v := x136;
+    test136(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y136;
+    test136(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest136;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol137.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp137 = double;
+{$else FPC_COMP_IS_INT64}
+  comp137 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test137(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of single');
+    halt(1)
+  end;
+
+procedure test137(a: single); overload;
+  begin
+    writeln('single called instead of shortstring');
+  end;
+
+var
+  x137: shortstring;
+
+  y137: single;
+procedure dotest137;
+var
+  v: variant;
+
+begin
+  try
+    v := x137;
+    test137(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y137;
+    test137(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest137;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol138.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp138 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp138 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test138(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of double');
+    halt(1)
+  end;
+
+procedure test138(a: double); overload;
+  begin
+    writeln('double called instead of shortstring');
+  end;
+
+var
+  x138: shortstring;
+
+  y138: double;
+procedure dotest138;
+var
+  v: variant;
+
+begin
+  try
+    v := x138;
+    test138(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y138;
+    test138(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest138;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol139.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp139 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp139 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test139(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of extended');
+    halt(1)
+  end;
+
+procedure test139(a: extended); overload;
+  begin
+    writeln('extended called instead of shortstring');
+  end;
+
+var
+  x139: shortstring;
+
+  y139: extended;
+procedure dotest139;
+var
+  v: variant;
+
+begin
+  try
+    v := x139;
+    test139(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y139;
+    test139(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest139;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol140.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp140 = double;
+{$else FPC_COMP_IS_INT64}
+  comp140 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test140(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of char');
+  end;
+
+procedure test140(a: char); overload;
+  begin
+    writeln('char called instead of shortstring');
+    halt(1)
+  end;
+
+var
+  x140: shortstring;
+
+  y140: char;
+procedure dotest140;
+var
+  v: variant;
+
+begin
+  try
+    v := x140;
+    test140(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y140;
+    test140(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest140;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol141.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp141 = double;
+{$else FPC_COMP_IS_INT64}
+  comp141 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test141(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of boolean');
+    halt(1)
+  end;
+
+procedure test141(a: boolean); overload;
+  begin
+    writeln('boolean called instead of shortstring');
+  end;
+
+var
+  x141: shortstring;
+
+  y141: boolean;
+procedure dotest141;
+var
+  v: variant;
+
+begin
+  try
+    v := x141;
+    test141(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y141;
+    test141(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest141;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol142.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp142 = double;
+{$else FPC_COMP_IS_INT64}
+  comp142 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test142(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of widestring');
+  end;
+
+procedure test142(a: widestring); overload;
+  begin
+    writeln('widestring called instead of shortstring');
+    halt(1)
+  end;
+
+var
+  x142: shortstring;
+
+  y142: widestring;
+procedure dotest142;
+var
+  v: variant;
+
+begin
+  try
+    v := x142;
+    test142(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y142;
+    test142(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest142;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol143.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp143 = double;
+{$else FPC_COMP_IS_INT64}
+  comp143 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test143(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of widechar');
+  end;
+
+procedure test143(a: widechar); overload;
+  begin
+    writeln('widechar called instead of shortstring');
+    halt(1)
+  end;
+
+var
+  x143: shortstring;
+
+  y143: widechar;
+procedure dotest143;
+var
+  v: variant;
+
+begin
+  try
+    v := x143;
+    test143(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y143;
+    test143(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest143;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol144.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp144 = double;
+{$else FPC_COMP_IS_INT64}
+  comp144 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test144(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of single');
+    halt(1)
+  end;
+
+procedure test144(a: single); overload;
+  begin
+    writeln('single called instead of ansistring');
+  end;
+
+var
+  x144: ansistring;
+
+  y144: single;
+procedure dotest144;
+var
+  v: variant;
+
+begin
+  try
+    v := x144;
+    test144(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y144;
+    test144(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest144;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol145.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp145 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp145 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test145(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of double');
+    halt(1)
+  end;
+
+procedure test145(a: double); overload;
+  begin
+    writeln('double called instead of ansistring');
+  end;
+
+var
+  x145: ansistring;
+
+  y145: double;
+procedure dotest145;
+var
+  v: variant;
+
+begin
+  try
+    v := x145;
+    test145(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y145;
+    test145(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest145;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol146.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp146 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp146 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test146(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of extended');
+    halt(1)
+  end;
+
+procedure test146(a: extended); overload;
+  begin
+    writeln('extended called instead of ansistring');
+  end;
+
+var
+  x146: ansistring;
+
+  y146: extended;
+procedure dotest146;
+var
+  v: variant;
+
+begin
+  try
+    v := x146;
+    test146(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y146;
+    test146(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest146;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol147.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp147 = double;
+{$else FPC_COMP_IS_INT64}
+  comp147 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test147(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of char');
+  end;
+
+procedure test147(a: char); overload;
+  begin
+    writeln('char called instead of ansistring');
+    halt(1)
+  end;
+
+var
+  x147: ansistring;
+
+  y147: char;
+procedure dotest147;
+var
+  v: variant;
+
+begin
+  try
+    v := x147;
+    test147(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y147;
+    test147(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest147;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol148.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp148 = double;
+{$else FPC_COMP_IS_INT64}
+  comp148 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test148(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of boolean');
+    halt(1)
+  end;
+
+procedure test148(a: boolean); overload;
+  begin
+    writeln('boolean called instead of ansistring');
+  end;
+
+var
+  x148: ansistring;
+
+  y148: boolean;
+procedure dotest148;
+var
+  v: variant;
+
+begin
+  try
+    v := x148;
+    test148(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y148;
+    test148(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest148;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol149.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp149 = double;
+{$else FPC_COMP_IS_INT64}
+  comp149 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test149(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of widestring');
+  end;
+
+procedure test149(a: widestring); overload;
+  begin
+    writeln('widestring called instead of ansistring');
+    halt(1)
+  end;
+
+var
+  x149: ansistring;
+
+  y149: widestring;
+procedure dotest149;
+var
+  v: variant;
+
+begin
+  try
+    v := x149;
+    test149(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y149;
+    test149(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest149;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol15.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp15 = double;
+{$else FPC_COMP_IS_INT64}
+  comp15 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test15(var a); overload;
+  begin
+    writeln('formal called instead of char');
+  end;
+
+procedure test15(a: char); overload;
+  begin
+    writeln('char called instead of formal');
+    halt(1)
+  end;
+
+var
+  x15: longint;
+
+  y15: char;
+procedure dotest15;
+var
+  v: variant;
+
+begin
+  try
+    v := x15;
+    test15(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y15;
+    test15(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest15;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol150.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp150 = double;
+{$else FPC_COMP_IS_INT64}
+  comp150 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test150(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of widechar');
+  end;
+
+procedure test150(a: widechar); overload;
+  begin
+    writeln('widechar called instead of ansistring');
+    halt(1)
+  end;
+
+var
+  x150: ansistring;
+
+  y150: widechar;
+procedure dotest150;
+var
+  v: variant;
+
+begin
+  try
+    v := x150;
+    test150(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y150;
+    test150(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest150;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol151.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp151 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp151 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test151(a: single); overload;
+  begin
+    writeln('single called instead of double');
+  end;
+
+procedure test151(a: double); overload;
+  begin
+    writeln('double called instead of single');
+    halt(1)
+  end;
+
+var
+  x151: single;
+
+  y151: double;
+procedure dotest151;
+var
+  v: variant;
+
+begin
+  try
+    v := x151;
+    test151(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y151;
+    test151(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest151;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol152.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp152 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp152 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test152(a: single); overload;
+  begin
+    writeln('single called instead of extended');
+  end;
+
+procedure test152(a: extended); overload;
+  begin
+    writeln('extended called instead of single');
+    halt(1)
+  end;
+
+var
+  x152: single;
+
+  y152: extended;
+procedure dotest152;
+var
+  v: variant;
+
+begin
+  try
+    v := x152;
+    test152(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y152;
+    test152(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest152;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol153.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp153 = double;
+{$else FPC_COMP_IS_INT64}
+  comp153 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test153(a: single); overload;
+  begin
+    writeln('single called instead of char');
+  end;
+
+procedure test153(a: char); overload;
+  begin
+    writeln('char called instead of single');
+    halt(1)
+  end;
+
+var
+  x153: single;
+
+  y153: char;
+procedure dotest153;
+var
+  v: variant;
+
+begin
+  try
+    v := x153;
+    test153(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y153;
+    test153(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest153;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol155.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp155 = double;
+{$else FPC_COMP_IS_INT64}
+  comp155 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test155(a: single); overload;
+  begin
+    writeln('single called instead of widestring');
+  end;
+
+procedure test155(a: widestring); overload;
+  begin
+    writeln('widestring called instead of single');
+    halt(1)
+  end;
+
+var
+  x155: single;
+
+  y155: widestring;
+procedure dotest155;
+var
+  v: variant;
+
+begin
+  try
+    v := x155;
+    test155(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y155;
+    test155(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest155;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol156.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp156 = double;
+{$else FPC_COMP_IS_INT64}
+  comp156 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test156(a: single); overload;
+  begin
+    writeln('single called instead of widechar');
+  end;
+
+procedure test156(a: widechar); overload;
+  begin
+    writeln('widechar called instead of single');
+    halt(1)
+  end;
+
+var
+  x156: single;
+
+  y156: widechar;
+procedure dotest156;
+var
+  v: variant;
+
+begin
+  try
+    v := x156;
+    test156(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y156;
+    test156(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest156;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol158.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp158 = double;
+{$else FPC_COMP_IS_INT64}
+  comp158 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test158(a: double); overload;
+  begin
+    writeln('double called instead of char');
+  end;
+
+procedure test158(a: char); overload;
+  begin
+    writeln('char called instead of double');
+    halt(1)
+  end;
+
+var
+  x158: double;
+
+  y158: char;
+procedure dotest158;
+var
+  v: variant;
+
+begin
+  try
+    v := x158;
+    test158(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y158;
+    test158(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest158;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol160.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp160 = double;
+{$else FPC_COMP_IS_INT64}
+  comp160 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test160(a: double); overload;
+  begin
+    writeln('double called instead of widestring');
+  end;
+
+procedure test160(a: widestring); overload;
+  begin
+    writeln('widestring called instead of double');
+    halt(1)
+  end;
+
+var
+  x160: double;
+
+  y160: widestring;
+procedure dotest160;
+var
+  v: variant;
+
+begin
+  try
+    v := x160;
+    test160(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y160;
+    test160(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest160;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol161.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp161 = double;
+{$else FPC_COMP_IS_INT64}
+  comp161 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test161(a: double); overload;
+  begin
+    writeln('double called instead of widechar');
+  end;
+
+procedure test161(a: widechar); overload;
+  begin
+    writeln('widechar called instead of double');
+    halt(1)
+  end;
+
+var
+  x161: double;
+
+  y161: widechar;
+procedure dotest161;
+var
+  v: variant;
+
+begin
+  try
+    v := x161;
+    test161(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y161;
+    test161(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest161;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol162.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp162 = double;
+{$else FPC_COMP_IS_INT64}
+  comp162 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test162(a: extended); overload;
+  begin
+    writeln('extended called instead of char');
+  end;
+
+procedure test162(a: char); overload;
+  begin
+    writeln('char called instead of extended');
+    halt(1)
+  end;
+
+var
+  x162: extended;
+
+  y162: char;
+procedure dotest162;
+var
+  v: variant;
+
+begin
+  try
+    v := x162;
+    test162(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y162;
+    test162(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest162;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol164.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp164 = double;
+{$else FPC_COMP_IS_INT64}
+  comp164 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test164(a: extended); overload;
+  begin
+    writeln('extended called instead of widestring');
+  end;
+
+procedure test164(a: widestring); overload;
+  begin
+    writeln('widestring called instead of extended');
+    halt(1)
+  end;
+
+var
+  x164: extended;
+
+  y164: widestring;
+procedure dotest164;
+var
+  v: variant;
+
+begin
+  try
+    v := x164;
+    test164(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y164;
+    test164(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest164;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol165.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp165 = double;
+{$else FPC_COMP_IS_INT64}
+  comp165 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test165(a: extended); overload;
+  begin
+    writeln('extended called instead of widechar');
+  end;
+
+procedure test165(a: widechar); overload;
+  begin
+    writeln('widechar called instead of extended');
+    halt(1)
+  end;
+
+var
+  x165: extended;
+
+  y165: widechar;
+procedure dotest165;
+var
+  v: variant;
+
+begin
+  try
+    v := x165;
+    test165(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y165;
+    test165(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest165;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol166.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp166 = double;
+{$else FPC_COMP_IS_INT64}
+  comp166 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test166(a: char); overload;
+  begin
+    writeln('char called instead of boolean');
+    halt(1)
+  end;
+
+procedure test166(a: boolean); overload;
+  begin
+    writeln('boolean called instead of char');
+  end;
+
+var
+  x166: char;
+
+  y166: boolean;
+procedure dotest166;
+var
+  v: variant;
+
+begin
+  try
+    v := x166;
+    test166(v);
+  except
+    on E : TObject do
+      writeln('QQQ');
+  end;
+
+  try
+    v := y166;
+    test166(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest166;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol167.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp167 = double;
+{$else FPC_COMP_IS_INT64}
+  comp167 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test167(a: char); overload;
+  begin
+    writeln('char called instead of widestring');
+    halt(1)
+  end;
+
+procedure test167(a: widestring); overload;
+  begin
+    writeln('widestring called instead of char');
+  end;
+
+var
+  x167: char;
+
+  y167: widestring;
+procedure dotest167;
+var
+  v: variant;
+
+begin
+  try
+    v := x167;
+    test167(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y167;
+    test167(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest167;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol169.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp169 = double;
+{$else FPC_COMP_IS_INT64}
+  comp169 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test169(a: boolean); overload;
+  begin
+    writeln('boolean called instead of widestring');
+  end;
+
+procedure test169(a: widestring); overload;
+  begin
+    writeln('widestring called instead of boolean');
+    halt(1)
+  end;
+
+var
+  x169: boolean;
+
+  y169: widestring;
+procedure dotest169;
+var
+  v: variant;
+
+begin
+  try
+    v := x169;
+    test169(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y169;
+    test169(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest169;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol17.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp17 = double;
+{$else FPC_COMP_IS_INT64}
+  comp17 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test17(var a); overload;
+  begin
+    writeln('formal called instead of widestring');
+  end;
+
+procedure test17(a: widestring); overload;
+  begin
+    writeln('widestring called instead of formal');
+    halt(1)
+  end;
+
+var
+  x17: longint;
+
+  y17: widestring;
+procedure dotest17;
+var
+  v: variant;
+
+begin
+  try
+    v := x17;
+    test17(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y17;
+    test17(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest17;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol170.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp170 = double;
+{$else FPC_COMP_IS_INT64}
+  comp170 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test170(a: boolean); overload;
+  begin
+    writeln('boolean called instead of widechar');
+  end;
+
+procedure test170(a: widechar); overload;
+  begin
+    writeln('widechar called instead of boolean');
+    halt(1)
+  end;
+
+var
+  x170: boolean;
+
+  y170: widechar;
+procedure dotest170;
+var
+  v: variant;
+
+begin
+  try
+    v := x170;
+    test170(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y170;
+    test170(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest170;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol171.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp171 = double;
+{$else FPC_COMP_IS_INT64}
+  comp171 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test171(a: widestring); overload;
+  begin
+    writeln('widestring called instead of widechar');
+  end;
+
+procedure test171(a: widechar); overload;
+  begin
+    writeln('widechar called instead of widestring');
+    halt(1)
+  end;
+
+var
+  x171: widestring;
+
+  y171: widechar;
+procedure dotest171;
+var
+  v: variant;
+
+begin
+  try
+    v := x171;
+    test171(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y171;
+    test171(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest171;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol18.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp18 = double;
+{$else FPC_COMP_IS_INT64}
+  comp18 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test18(var a); overload;
+  begin
+    writeln('formal called instead of widechar');
+  end;
+
+procedure test18(a: widechar); overload;
+  begin
+    writeln('widechar called instead of formal');
+    halt(1)
+  end;
+
+var
+  x18: longint;
+
+  y18: widechar;
+procedure dotest18;
+var
+  v: variant;
+
+begin
+  try
+    v := x18;
+    test18(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y18;
+    test18(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest18;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol19.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp19 = double;
+{$else FPC_COMP_IS_INT64}
+  comp19 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test19(a: comp19); overload;
+  begin
+    writeln('comp19 called instead of int64');
+  end;
+
+procedure test19(a: int64); overload;
+  begin
+    writeln('int64 called instead of comp19');
+    halt(1)
+  end;
+
+var
+  x19: comp19;
+
+  y19: int64;
+procedure dotest19;
+var
+  v: variant;
+
+begin
+  try
+    v := x19;
+    test19(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y19;
+    test19(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest19;
+end. {$endif not bigfile}

+ 24 - 12
tests/test/cg/variants/tvarol2.pp → tests/test/cg/variants/ivarol2.pp

@@ -1,42 +1,54 @@
+{$ifndef bigfile}
 {$ifdef fpc}
 {$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
 {$endif fpc}
+{$endif bigfile}
 
-{$ifdef FPC_COMP_IS_INT64}
 type 
-  comp = double;
+{$ifdef FPC_COMP_IS_INT64}
+  comp2 = double;
+{$else FPC_COMP_IS_INT64}
+  comp2 = comp;
 {$endif FPC_COMP_IS_INT64}
-procedure test(var a); overload;
+procedure test2(var a); overload;
   begin
     writeln('formal called instead of int64');
-    writeln('XXX')
   end;
 
-procedure test(a: int64); overload;
+procedure test2(a: int64); overload;
   begin
     writeln('int64 called instead of formal');
     halt(1)
   end;
 
+var
+  x2: longint;
+
+  y2: int64;
+procedure dotest2;
 var
   v: variant;
-  x: longint;
-  y: int64;
 
 begin
   try
-    v := x;
-    test(v);
+    v := x2;
+    test2(v);
   except
     on E : TObject do
       halt(1);
   end;
 
   try
-    v := y;
-    test(v);
+    v := y2;
+    test2(v);
   except
     on E : TObject do
       halt(1);
   end;
-end.
+end;
+
+{$ifndef bigfile} begin
+  dotest2;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol21.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp21 = double;
+{$else FPC_COMP_IS_INT64}
+  comp21 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test21(a: comp21); overload;
+  begin
+    writeln('comp21 called instead of longint');
+    halt(1)
+  end;
+
+procedure test21(a: longint); overload;
+  begin
+    writeln('longint called instead of comp21');
+  end;
+
+var
+  x21: comp21;
+
+  y21: longint;
+procedure dotest21;
+var
+  v: variant;
+
+begin
+  try
+    v := x21;
+    test21(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y21;
+    test21(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest21;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol22.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp22 = double;
+{$else FPC_COMP_IS_INT64}
+  comp22 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test22(a: comp22); overload;
+  begin
+    writeln('comp22 called instead of cardinal');
+    halt(1)
+  end;
+
+procedure test22(a: cardinal); overload;
+  begin
+    writeln('cardinal called instead of comp22');
+  end;
+
+var
+  x22: comp22;
+
+  y22: cardinal;
+procedure dotest22;
+var
+  v: variant;
+
+begin
+  try
+    v := x22;
+    test22(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y22;
+    test22(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest22;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol23.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp23 = double;
+{$else FPC_COMP_IS_INT64}
+  comp23 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test23(a: comp23); overload;
+  begin
+    writeln('comp23 called instead of word');
+    halt(1)
+  end;
+
+procedure test23(a: word); overload;
+  begin
+    writeln('word called instead of comp23');
+  end;
+
+var
+  x23: comp23;
+
+  y23: word;
+procedure dotest23;
+var
+  v: variant;
+
+begin
+  try
+    v := x23;
+    test23(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y23;
+    test23(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest23;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol24.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp24 = double;
+{$else FPC_COMP_IS_INT64}
+  comp24 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test24(a: comp24); overload;
+  begin
+    writeln('comp24 called instead of smallint');
+    halt(1)
+  end;
+
+procedure test24(a: smallint); overload;
+  begin
+    writeln('smallint called instead of comp24');
+  end;
+
+var
+  x24: comp24;
+
+  y24: smallint;
+procedure dotest24;
+var
+  v: variant;
+
+begin
+  try
+    v := x24;
+    test24(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y24;
+    test24(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest24;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol25.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp25 = double;
+{$else FPC_COMP_IS_INT64}
+  comp25 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test25(a: comp25); overload;
+  begin
+    writeln('comp25 called instead of byte');
+    halt(1)
+  end;
+
+procedure test25(a: byte); overload;
+  begin
+    writeln('byte called instead of comp25');
+  end;
+
+var
+  x25: comp25;
+
+  y25: byte;
+procedure dotest25;
+var
+  v: variant;
+
+begin
+  try
+    v := x25;
+    test25(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y25;
+    test25(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest25;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol26.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp26 = double;
+{$else FPC_COMP_IS_INT64}
+  comp26 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test26(a: comp26); overload;
+  begin
+    writeln('comp26 called instead of shortint');
+    halt(1)
+  end;
+
+procedure test26(a: shortint); overload;
+  begin
+    writeln('shortint called instead of comp26');
+  end;
+
+var
+  x26: comp26;
+
+  y26: shortint;
+procedure dotest26;
+var
+  v: variant;
+
+begin
+  try
+    v := x26;
+    test26(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y26;
+    test26(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest26;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol27.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp27 = double;
+{$else FPC_COMP_IS_INT64}
+  comp27 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test27(a: comp27); overload;
+  begin
+    writeln('comp27 called instead of shortstring');
+  end;
+
+procedure test27(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of comp27');
+    halt(1)
+  end;
+
+var
+  x27: comp27;
+
+  y27: shortstring;
+procedure dotest27;
+var
+  v: variant;
+
+begin
+  try
+    v := x27;
+    test27(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y27;
+    test27(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest27;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol28.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp28 = double;
+{$else FPC_COMP_IS_INT64}
+  comp28 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test28(a: comp28); overload;
+  begin
+    writeln('comp28 called instead of ansistring');
+  end;
+
+procedure test28(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of comp28');
+    halt(1)
+  end;
+
+var
+  x28: comp28;
+
+  y28: ansistring;
+procedure dotest28;
+var
+  v: variant;
+
+begin
+  try
+    v := x28;
+    test28(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y28;
+    test28(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest28;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol29.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp29 = double;
+{$else FPC_COMP_IS_INT64}
+  comp29 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test29(a: comp29); overload;
+  begin
+    writeln('comp29 called instead of single');
+    halt(1)
+  end;
+
+procedure test29(a: single); overload;
+  begin
+    writeln('single called instead of comp29');
+  end;
+
+var
+  x29: comp29;
+
+  y29: single;
+procedure dotest29;
+var
+  v: variant;
+
+begin
+  try
+    v := x29;
+    test29(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y29;
+    test29(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest29;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol32.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp32 = double;
+{$else FPC_COMP_IS_INT64}
+  comp32 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test32(a: comp32); overload;
+  begin
+    writeln('comp32 called instead of char');
+  end;
+
+procedure test32(a: char); overload;
+  begin
+    writeln('char called instead of comp32');
+    halt(1)
+  end;
+
+var
+  x32: comp32;
+
+  y32: char;
+procedure dotest32;
+var
+  v: variant;
+
+begin
+  try
+    v := x32;
+    test32(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y32;
+    test32(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest32;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol34.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp34 = double;
+{$else FPC_COMP_IS_INT64}
+  comp34 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test34(a: comp34); overload;
+  begin
+    writeln('comp34 called instead of widestring');
+  end;
+
+procedure test34(a: widestring); overload;
+  begin
+    writeln('widestring called instead of comp34');
+    halt(1)
+  end;
+
+var
+  x34: comp34;
+
+  y34: widestring;
+procedure dotest34;
+var
+  v: variant;
+
+begin
+  try
+    v := x34;
+    test34(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y34;
+    test34(v);
+  except
+    on E : TObject do
+      writeln('VVV');
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest34;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol35.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp35 = double;
+{$else FPC_COMP_IS_INT64}
+  comp35 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test35(a: comp35); overload;
+  begin
+    writeln('comp35 called instead of widechar');
+  end;
+
+procedure test35(a: widechar); overload;
+  begin
+    writeln('widechar called instead of comp35');
+    halt(1)
+  end;
+
+var
+  x35: comp35;
+
+  y35: widechar;
+procedure dotest35;
+var
+  v: variant;
+
+begin
+  try
+    v := x35;
+    test35(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y35;
+    test35(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest35;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol36.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp36 = double;
+{$else FPC_COMP_IS_INT64}
+  comp36 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test36(a: int64); overload;
+  begin
+    writeln('int64 called instead of currency');
+    halt(1)
+  end;
+
+procedure test36(a: currency); overload;
+  begin
+    writeln('currency called instead of int64');
+  end;
+
+var
+  x36: int64;
+
+  y36: currency;
+procedure dotest36;
+var
+  v: variant;
+
+begin
+  try
+    v := x36;
+    test36(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y36;
+    test36(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest36;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol37.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp37 = double;
+{$else FPC_COMP_IS_INT64}
+  comp37 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test37(a: int64); overload;
+  begin
+    writeln('int64 called instead of longint');
+    halt(1)
+  end;
+
+procedure test37(a: longint); overload;
+  begin
+    writeln('longint called instead of int64');
+  end;
+
+var
+  x37: int64;
+
+  y37: longint;
+procedure dotest37;
+var
+  v: variant;
+
+begin
+  try
+    v := x37;
+    test37(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y37;
+    test37(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest37;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol38.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp38 = double;
+{$else FPC_COMP_IS_INT64}
+  comp38 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test38(a: int64); overload;
+  begin
+    writeln('int64 called instead of cardinal');
+    halt(1)
+  end;
+
+procedure test38(a: cardinal); overload;
+  begin
+    writeln('cardinal called instead of int64');
+  end;
+
+var
+  x38: int64;
+
+  y38: cardinal;
+procedure dotest38;
+var
+  v: variant;
+
+begin
+  try
+    v := x38;
+    test38(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y38;
+    test38(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest38;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol39.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp39 = double;
+{$else FPC_COMP_IS_INT64}
+  comp39 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test39(a: int64); overload;
+  begin
+    writeln('int64 called instead of word');
+    halt(1)
+  end;
+
+procedure test39(a: word); overload;
+  begin
+    writeln('word called instead of int64');
+  end;
+
+var
+  x39: int64;
+
+  y39: word;
+procedure dotest39;
+var
+  v: variant;
+
+begin
+  try
+    v := x39;
+    test39(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y39;
+    test39(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest39;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol40.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp40 = double;
+{$else FPC_COMP_IS_INT64}
+  comp40 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test40(a: int64); overload;
+  begin
+    writeln('int64 called instead of smallint');
+    halt(1)
+  end;
+
+procedure test40(a: smallint); overload;
+  begin
+    writeln('smallint called instead of int64');
+  end;
+
+var
+  x40: int64;
+
+  y40: smallint;
+procedure dotest40;
+var
+  v: variant;
+
+begin
+  try
+    v := x40;
+    test40(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y40;
+    test40(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest40;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol41.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp41 = double;
+{$else FPC_COMP_IS_INT64}
+  comp41 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test41(a: int64); overload;
+  begin
+    writeln('int64 called instead of byte');
+    halt(1)
+  end;
+
+procedure test41(a: byte); overload;
+  begin
+    writeln('byte called instead of int64');
+  end;
+
+var
+  x41: int64;
+
+  y41: byte;
+procedure dotest41;
+var
+  v: variant;
+
+begin
+  try
+    v := x41;
+    test41(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y41;
+    test41(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest41;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol42.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp42 = double;
+{$else FPC_COMP_IS_INT64}
+  comp42 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test42(a: int64); overload;
+  begin
+    writeln('int64 called instead of shortint');
+    halt(1)
+  end;
+
+procedure test42(a: shortint); overload;
+  begin
+    writeln('shortint called instead of int64');
+  end;
+
+var
+  x42: int64;
+
+  y42: shortint;
+procedure dotest42;
+var
+  v: variant;
+
+begin
+  try
+    v := x42;
+    test42(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y42;
+    test42(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest42;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol43.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp43 = double;
+{$else FPC_COMP_IS_INT64}
+  comp43 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test43(a: int64); overload;
+  begin
+    writeln('int64 called instead of shortstring');
+    halt(1)
+  end;
+
+procedure test43(a: shortstring); overload;
+  begin
+    writeln('shortstring called instead of int64');
+  end;
+
+var
+  x43: int64;
+
+  y43: shortstring;
+procedure dotest43;
+var
+  v: variant;
+
+begin
+  try
+    v := x43;
+    test43(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y43;
+    test43(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest43;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol44.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp44 = double;
+{$else FPC_COMP_IS_INT64}
+  comp44 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test44(a: int64); overload;
+  begin
+    writeln('int64 called instead of ansistring');
+    halt(1)
+  end;
+
+procedure test44(a: ansistring); overload;
+  begin
+    writeln('ansistring called instead of int64');
+  end;
+
+var
+  x44: int64;
+
+  y44: ansistring;
+procedure dotest44;
+var
+  v: variant;
+
+begin
+  try
+    v := x44;
+    test44(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y44;
+    test44(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest44;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol45.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp45 = double;
+{$else FPC_COMP_IS_INT64}
+  comp45 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test45(a: int64); overload;
+  begin
+    writeln('int64 called instead of single');
+    halt(1)
+  end;
+
+procedure test45(a: single); overload;
+  begin
+    writeln('single called instead of int64');
+  end;
+
+var
+  x45: int64;
+
+  y45: single;
+procedure dotest45;
+var
+  v: variant;
+
+begin
+  try
+    v := x45;
+    test45(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y45;
+    test45(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest45;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol46.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp46 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp46 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test46(a: int64); overload;
+  begin
+    writeln('int64 called instead of double');
+    halt(1)
+  end;
+
+procedure test46(a: double); overload;
+  begin
+    writeln('double called instead of int64');
+  end;
+
+var
+  x46: int64;
+
+  y46: double;
+procedure dotest46;
+var
+  v: variant;
+
+begin
+  try
+    v := x46;
+    test46(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y46;
+    test46(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest46;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol47.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp47 = currency;
+{$else FPC_COMP_IS_INT64}
+  comp47 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test47(a: int64); overload;
+  begin
+    writeln('int64 called instead of extended');
+    halt(1)
+  end;
+
+procedure test47(a: extended); overload;
+  begin
+    writeln('extended called instead of int64');
+  end;
+
+var
+  x47: int64;
+
+  y47: extended;
+procedure dotest47;
+var
+  v: variant;
+
+begin
+  try
+    v := x47;
+    test47(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y47;
+    test47(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest47;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol49.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp49 = double;
+{$else FPC_COMP_IS_INT64}
+  comp49 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test49(a: int64); overload;
+  begin
+    writeln('int64 called instead of boolean');
+    halt(1)
+  end;
+
+procedure test49(a: boolean); overload;
+  begin
+    writeln('boolean called instead of int64');
+  end;
+
+var
+  x49: int64;
+
+  y49: boolean;
+procedure dotest49;
+var
+  v: variant;
+
+begin
+  try
+    v := x49;
+    test49(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y49;
+    test49(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest49;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol50.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp50 = double;
+{$else FPC_COMP_IS_INT64}
+  comp50 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test50(a: int64); overload;
+  begin
+    writeln('int64 called instead of widestring');
+    halt(1)
+  end;
+
+procedure test50(a: widestring); overload;
+  begin
+    writeln('widestring called instead of int64');
+  end;
+
+var
+  x50: int64;
+
+  y50: widestring;
+procedure dotest50;
+var
+  v: variant;
+
+begin
+  try
+    v := x50;
+    test50(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y50;
+    test50(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest50;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol52.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp52 = double;
+{$else FPC_COMP_IS_INT64}
+  comp52 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test52(a: currency); overload;
+  begin
+    writeln('currency called instead of longint');
+    halt(1)
+  end;
+
+procedure test52(a: longint); overload;
+  begin
+    writeln('longint called instead of currency');
+  end;
+
+var
+  x52: currency;
+
+  y52: longint;
+procedure dotest52;
+var
+  v: variant;
+
+begin
+  try
+    v := x52;
+    test52(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y52;
+    test52(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest52;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol53.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp53 = double;
+{$else FPC_COMP_IS_INT64}
+  comp53 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test53(a: currency); overload;
+  begin
+    writeln('currency called instead of cardinal');
+    halt(1)
+  end;
+
+procedure test53(a: cardinal); overload;
+  begin
+    writeln('cardinal called instead of currency');
+  end;
+
+var
+  x53: currency;
+
+  y53: cardinal;
+procedure dotest53;
+var
+  v: variant;
+
+begin
+  try
+    v := x53;
+    test53(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y53;
+    test53(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest53;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol54.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp54 = double;
+{$else FPC_COMP_IS_INT64}
+  comp54 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test54(a: currency); overload;
+  begin
+    writeln('currency called instead of word');
+    halt(1)
+  end;
+
+procedure test54(a: word); overload;
+  begin
+    writeln('word called instead of currency');
+  end;
+
+var
+  x54: currency;
+
+  y54: word;
+procedure dotest54;
+var
+  v: variant;
+
+begin
+  try
+    v := x54;
+    test54(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y54;
+    test54(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest54;
+end. {$endif not bigfile}

+ 54 - 0
tests/test/cg/variants/ivarol55.pp

@@ -0,0 +1,54 @@
+{$ifndef bigfile}
+{$ifdef fpc}
+{$mode delphi}
+{$else fpc}
+{$define FPC_HAS_TYPE_EXTENDED}
+{$endif fpc}
+{$endif bigfile}
+
+type 
+{$ifdef FPC_COMP_IS_INT64}
+  comp55 = double;
+{$else FPC_COMP_IS_INT64}
+  comp55 = comp;
+{$endif FPC_COMP_IS_INT64}
+procedure test55(a: currency); overload;
+  begin
+    writeln('currency called instead of smallint');
+    halt(1)
+  end;
+
+procedure test55(a: smallint); overload;
+  begin
+    writeln('smallint called instead of currency');
+  end;
+
+var
+  x55: currency;
+
+  y55: smallint;
+procedure dotest55;
+var
+  v: variant;
+
+begin
+  try
+    v := x55;
+    test55(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+
+  try
+    v := y55;
+    test55(v);
+  except
+    on E : TObject do
+      halt(1);
+  end;
+end;
+
+{$ifndef bigfile} begin
+  dotest55;
+end. {$endif not bigfile}

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff