Commit Graph

3268 Commits

Author SHA1 Message Date
yury
b14276d62a * Fixed tests to be locale independent.
git-svn-id: trunk@10693 -
2008-04-18 13:31:43 +00:00
yury
95ea5d87dd * Fixed int to int conversion in ARM code generator.
+ Added new test to detect more bugs in int to int conversion.

git-svn-id: trunk@10691 -
2008-04-18 11:31:12 +00:00
yury
ec943198fd * Properly fill treference.alignment when variable is loaded by tcgloadnode. It allows code generator to insert unaligned handling if needed.
* Improved generic a_load_ref_reg_unaligned if ref alignment is 2.
* Improved unaligned load/store of register for ARM.
* It fixes passing records by value on ARM.
+ New test.

git-svn-id: trunk@10681 -
2008-04-16 23:01:20 +00:00
yury
24be2c31f7 * Fixed tw11027.
* Updated tcnvint2 to new rules.

git-svn-id: trunk@10677 -
2008-04-16 08:34:30 +00:00
yury
771479e65c * Improved fix for bug #10233 for better Delphi compatibility and efficiency:
- Explicit typecasts like LongBool(byte_value) do not change ordinal value.
  - Explicit typecasts like ByteBool(longint_value) do not change ordinal value and can lead to data loss if longint_value is outside of ByteBool range.
  - Explicit typecasts like ByteBool(LongBool) handle type ranges correctly.
  - Updated test tw10233.pp. It is passed by Delphi as well.

git-svn-id: trunk@10672 -
2008-04-15 22:19:29 +00:00
Jonas Maebe
76e23fc54e * fixed internalerror when having to choose between different
overloads in case there is only one variant parameter and
    one of the candidates has more hidden parameters than the
    other at the start (e.g. function(para):char and
    function(para):shortstring, depending on in which order the
    hidden shortstring result and para are processed, mantis
    #11139)

git-svn-id: trunk@10643 -
2008-04-13 10:21:26 +00:00
Jonas Maebe
668d1283a9 + test for already fixed mantis 11053
git-svn-id: trunk@10636 -
2008-04-12 17:47:12 +00:00
yury
a9295d1c66 * On windows event can not be "abandoned". Skip this part of the test.
git-svn-id: trunk@10634 -
2008-04-12 14:44:55 +00:00
yury
adeafe6ef4 * Updated readme about running test suite on arm-wince device.
git-svn-id: trunk@10633 -
2008-04-12 14:14:55 +00:00
florian
951a202e5d * fix by Jan Bruns for #11042: improves reading of references on arm
git-svn-id: trunk@10625 -
2008-04-10 19:47:49 +00:00
Jonas Maebe
7e4750ac50 * workaround for default property constant value limitations
git-svn-id: trunk@10575 -
2008-03-28 10:15:33 +00:00
michael
e464a24c47 Test from Giulio Bernardi for bug #10791 (which was fixed in rev 10535)
git-svn-id: trunk@10569 -
2008-03-27 19:40:30 +00:00
Jonas Maebe
61df38ae9b + tests from mantis #6586, already work after the previous shared
library fixes

git-svn-id: trunk@10559 -
2008-03-25 15:44:30 +00:00
Jonas Maebe
fe7e0e2eb6 * also exit with an error if the dynamic library cannot be opened
git-svn-id: trunk@10558 -
2008-03-25 12:42:28 +00:00
Jonas Maebe
4db9ebcb1b * removed initc unit (not needed, and doesn't exist on windows)
git-svn-id: trunk@10557 -
2008-03-25 12:39:37 +00:00
Jonas Maebe
8a98d46594 * fixed test
git-svn-id: trunk@10556 -
2008-03-25 12:36:10 +00:00
Jonas Maebe
99e1e85447 * fixed execution of finalization section of smart linked shared
libraries on linux (mantis #6822)
  * fixed execution of library finalization sections on darwin
    (previously only the finalization section of the library
     compilation unit itself was executed, now those of the units
     used by the library are also executed)

git-svn-id: trunk@10554 -
2008-03-24 22:19:21 +00:00
micha
b0838b13d7 * add armeb target to compiler/Makefiles
git-svn-id: trunk@10552 -
2008-03-24 17:48:11 +00:00
Jonas Maebe
150eda304b * factored unix exports handling from t_bsd and t_linux into expunix unit
(todo: at least solaris, maybe others)
  * changed the "exports" section handling:
    a) make everything private which is not exported (implemented for
       darwin and linux)
    b) for the exported symbols:
     - functions/procedures
      1) if no name or index is provided, and if the procedure has aliases
         defined via the public/export directives, then export the default
         mangled name and all defined aliases
      2) otherwise if no name is specified (but there is an index) then
        i) if the procedure is defined as cdecl/cppdecl/mwpascal, use the
           appropriately mangled version of the function name
       ii) otherwise export the name without any mangling(e.g. "exports
           proc1" -> proc1 is the exported name)
     - variables
      1) if no name is provided and the variable was specified as cvar,
         use the mangled name
      2) otherwise if no name is provided, export the name without any
         mangling
  -> initialization/finalization of shared libraries under Linux works
     again (mantis #7838)
  -> sharing symbols between shared library and main program works
     under Linux (mantis #9089)

git-svn-id: trunk@10551 -
2008-03-24 16:55:05 +00:00
peter
52722b2cab * allocate .bss entries manual so we can take care of alignment
* disable COMMON symbol code, it might be needed again for ELF package
    support (.comm for ELF supports alignment)

git-svn-id: trunk@10549 -
2008-03-24 11:55:03 +00:00
florian
97bde1ecd6 * handle integer operations on variants containing doubles correctly, resolves #11033
git-svn-id: trunk@10533 -
2008-03-22 15:35:44 +00:00
Jonas Maebe
87295e4ef6 * applies suggestion from Vincent to hopefully fix random lockups in the
test

git-svn-id: trunk@10524 -
2008-03-21 15:30:44 +00:00
Jonas Maebe
62e66d2a56 * explicit typecasting of any ordinal type to a boolean of the same
size must happen without any mangling of the value (mantis #11027)
  * moved checking for signed-to-unsigned (or vice versa) type
    conversions in assignments from htypechk to ncnv (where there
    was already code for similar checks) and added support for
    bool_to_bool there as well

git-svn-id: trunk@10521 -
2008-03-21 14:44:58 +00:00
Jonas Maebe
5cc0477dfa * test is not for windows
git-svn-id: trunk@10497 -
2008-03-16 09:28:26 +00:00
Jonas Maebe
b4d59bf0fb + test for previous commit with main program linking to libc
(apparently already works after all :)

git-svn-id: trunk@10496 -
2008-03-15 23:53:55 +00:00
Jonas Maebe
3eec0569be * fixed shared library initialisation for FPC-compiled libraries
when linked to FPC-compiled programs under linux/i386 which
    do not use libc + test (mantis #8730). Programs which do use
    libc and other linux targets have to be fixed in a similar
    way until we properly fix everything by not exporting
    any symbols at all from shared libraries by default (and
    only those appearing in the "exports" section).

    Finalisation does not work yet either for FPC-compiled
    programs on linux/anything.

git-svn-id: trunk@10495 -
2008-03-15 23:28:09 +00:00
Jonas Maebe
9aac8a7852 * fixed test
git-svn-id: trunk@10494 -
2008-03-15 23:20:11 +00:00
micha
eae3754ab7 * add testcase of issue #11006 to testsuite
git-svn-id: trunk@10493 -
2008-03-15 20:18:28 +00:00
michael
174de3eab1 Merged revisions 9693-10480 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
  r9694 | michael | 2008-01-09 21:31:18 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Initial check-in
........
  r9695 | michael | 2008-01-09 21:35:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New version from Giulio Bernardi
........
  r9697 | michael | 2008-01-09 21:41:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi with resource support
........
  r9698 | michael | 2008-01-09 21:46:33 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi to add more resource testing
........
  r9699 | michael | 2008-01-09 21:57:26 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9700 | michael | 2008-01-09 21:58:23 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9701 | michael | 2008-01-09 22:01:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9702 | michael | 2008-01-09 22:01:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9703 | michael | 2008-01-10 08:54:26 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Fixed double code
........
  r9704 | jonas | 2008-01-10 10:59:20 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    - removed duplicate code
........
  r9705 | jonas | 2008-01-10 11:25:21 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + added missing fcl-res dependencies
........
  r9706 | jonas | 2008-01-10 11:58:30 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + dependencies for fpintres and fpextres
........
  r9707 | yury | 2008-01-10 12:47:51 +0100 (Thu, 10 Jan 2008) | 3 lines
  
  * Fixed compilation of resource, which is included in a unit located in different folder than main source.
  * .res files must be copied to units output folder, otherwise .res files will not be found when only compiled units path is available and compiler does not know anything about sources folder.
  * Improved resource related error messages.
........
  r9708 | michael | 2008-01-10 12:52:13 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Removed double source after end.
........
  r9709 | michael | 2008-01-10 12:52:48 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * No longer needed
........
  r9710 | tom_at_work | 2008-01-10 22:09:08 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * properly align FPC_RESLOCATION so that linking does not fail on some architectures (e.g. ppc64)
........
  r9711 | tom_at_work | 2008-01-10 23:53:12 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * fix splitting of 64 bit load/stores from/to unaligned memory locations into multiple load/stores, which in some cases generated wrong code
........
  r9712 | michael | 2008-01-11 11:00:08 +0100 (Fri, 11 Jan 2008) | 1 line
  
  * Fixed bug in BSS section on 64-bit platforms
........
  r9720 | giulio | 2008-01-12 10:02:04 +0100 (Sat, 12 Jan 2008) | 1 line
  
  Updated fcl-res documentation: occurrences of reslib changed to fcl-res.
........
  r9740 | giulio | 2008-01-13 19:36:44 +0100 (Sun, 13 Jan 2008) | 3 lines
  
   - Don't try to compile resources on systems with a non windows-like resource support.
   - Don't add the .or file to the list of object files if resource compiling failed.
........
  r10201 | giulio | 2008-02-04 11:35:44 +0100 (Mon, 04 Feb 2008) | 5 lines
  
  * resource compiling supported on OS/2 via wrc
  * CompileResourceFiles and CollectResourceFiles don't do target-specific checks anymore
  * refactored a bit
........
  r10389 | giulio | 2008-02-25 21:32:52 +0100 (Mon, 25 Feb 2008) | 2 lines
  
  Deleted test file which was committed by mistake
........
  r10472 | giulio | 2008-03-10 12:22:18 +0100 (Mon, 10 Mar 2008) | 2 lines
  
  changed define FPC_HAS_RESOURCES to FPC_HAS_WINLIKERESOURCES
........

git-svn-id: trunk@10481 -
2008-03-12 21:33:48 +00:00
Jonas Maebe
7d3498bb04 * fixed test
git-svn-id: trunk@10474 -
2008-03-11 19:31:09 +00:00
Jonas Maebe
c2e3b7067f + added {$goto on} so it still compiles on systems without a
default config file (or one without -Sg in it)

git-svn-id: trunk@10468 -
2008-03-09 19:34:22 +00:00
micha
b96823997d + add "FILES" variable for testsuite tests: list of files required by test needing to be copied to remote target
git-svn-id: trunk@10467 -
2008-03-09 18:25:25 +00:00
Jonas Maebe
8adc596c16 - revert fix for #10927: the old behaviour was Delphi compatible,
and the fix caused other problems (#10979)

git-svn-id: trunk@10464 -
2008-03-08 18:17:31 +00:00
Jonas Maebe
005bdc1af4 * fixed "inherited some_property" constructs for getters/setters
(mantis #10927)
  * extended the tb0259 test a bit (tests similar constructs in
    case there is no getter/setter)

git-svn-id: trunk@10456 -
2008-03-07 19:29:40 +00:00
Jonas Maebe
931aef4daa * make result of not(constant) (with constant type <= sinttype)
equal to sinttype (Delphi-compatible, fixes #10966)
  * changed not(cardinal_constant) into sinttype on 64 bit
    platforms for consistency with other similar rules (and with
    the above change)

git-svn-id: trunk@10455 -
2008-03-07 16:33:15 +00:00
Jonas Maebe
1885e247b4 * fixed test for 64 bit platforms
git-svn-id: trunk@10454 -
2008-03-07 09:15:03 +00:00
florian
914a8ec4b4 * convert the array into a variant as well before calling fpc_variant_put, resolves #10495
git-svn-id: trunk@10453 -
2008-03-06 22:15:04 +00:00
Jonas Maebe
0ae33aeab0 * the result of not(dword(ordconst)) has to be dword as well for Delphi
compatibility (and to avoid range errors like in mantis #10931)

git-svn-id: trunk@10451 -
2008-03-06 21:36:32 +00:00
Jonas Maebe
761f2e5c93 * fixed constant evaluation of not(byte/word/long/quadbool) + test
git-svn-id: trunk@10450 -
2008-03-06 20:29:27 +00:00
peter
761344e9fc * don't allow passing ordinal and real constants to formal const parameters
git-svn-id: trunk@10426 -
2008-03-02 15:00:32 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
Jonas Maebe
d80d3f36d2 * fixed crash when writing a currency value with a specified number
of fractional digits in case it's not the last value of the
    write(ln) statement (mantis #10920)

git-svn-id: trunk@10421 -
2008-03-02 10:22:25 +00:00
Jonas Maebe
b8e904f531 + also test "pointer + integer" constant evaluation
git-svn-id: trunk@10420 -
2008-03-02 09:58:29 +00:00
Jonas Maebe
22f02977ca * fixed warnings now that "longint or cardinal" gives a 64 bit result
(part of r10418, forgot to commit)

git-svn-id: trunk@10419 -
2008-03-02 09:44:14 +00:00
Jonas Maebe
97f4c0a130 * call taddnode.simplify at the very end of taddnode.pass_typecheck, so
it doesn't have to duplicate any type checking code, and so constant
    expressions get the same resultdefs as non-constant expressions
  * properly fixed resultdef determination of "set + setelementn" (follows
    same rules now as "set + set")
  * also convert "longint or/xor cardinal" to int64 (needed for correct
    results with negative numbers and Delphi-compatible) + test
  * extended 64-to-32 type conversion simplification to also handle
    or/xor nodes (so if the result is typecasted back to 32 bit, the
    evaluation can still be done entirely in 32 bit). These changes also
    enable that optimization in some extra cases (not just anymore for
    expressions containing only uint32)

git-svn-id: trunk@10418 -
2008-03-01 20:48:50 +00:00
florian
288fb08f09 + more implements tests
git-svn-id: trunk@10417 -
2008-03-01 20:41:28 +00:00
florian
1b4071d930 + first test for implements through classes
git-svn-id: trunk@10416 -
2008-03-01 20:35:09 +00:00
florian
d83722076f * fixed implements for interfaces
+ tests for implements through interface

git-svn-id: trunk@10413 -
2008-03-01 20:20:49 +00:00
Jonas Maebe
86f90d8ac1 + support for setting the name of "main" (-XM command line parameter) in
the code using {$pascalmainname x} + storing it in the ppu file
    (and give a warning if it's overridden multiple times + test)

git-svn-id: trunk@10406 -
2008-03-01 13:05:01 +00:00
Jonas Maebe
e1ec2834df * increase/decrease refcount of interface value parameters on procedure
entry/exit (mantis #10897)
  * fixed tinterface2 which crashed after this change. It also crashed under
    Kylix: you cannot assign the result of an interfaced class to a class
    instance variable and then use it both as an interface (refcounted) and
    as class (non-refcounted)

git-svn-id: trunk@10405 -
2008-03-01 10:25:27 +00:00