fpc/compiler
svenbarth 66fa732720 Merged revision(s) 47634, 47655 from trunk:
* fix for Mantis #38145: allow overloading of assignment operators that return ShortStrings with a specific size
+ added tests

The following rules for using these operator overloads as *implicit* overloads apply (Delphi compatible):
  - if a found assignment operator returns a default ShortString then that is used
  - if only one assignment operator to a String[x] is found then that is used
  - otherwise the assignment is not possible
The explicit assignment checks for an exact match (and falls back for an implicit assignment). This is not entirely Delphi compatible as Delphi seems to favor the first found symbol in that case, but sometimes also not... :/
........
* with the recent ShortString changes this test is no longer needed as it was added exactly to check the condition I removed, so disable it for 3.2.1 and newer (as I want to merge these changes back to fixes)
........

git-svn-id: branches/fixes_3_2@49055 -
2021-03-26 06:18:40 +00:00
..
aarch64 --- Merging r46880 into '.': 2020-12-11 15:40:07 +00:00
arm Merge of commit #47207 2020-12-31 11:18:37 +00:00
avr * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
generic Merge of several commits related to enhancements in PPU writing 2019-11-04 08:50:42 +00:00
html
i386 * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
i8086 * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
jvm * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
llvm * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
m68k * Merging recent m68k FPU fixes from trunk: r42829, r48413, r48414, r48522, r48523, r48524 2021-02-13 13:01:21 +00:00
mips * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
msg * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
powerpc * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
powerpc64 * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
ppcgen * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
sparc * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
sparc64 * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
sparcgen Merge commit 47798 to fixes branch 2020-12-20 22:04:33 +00:00
systems --- Merging r48762 into '.': 2021-02-21 22:39:45 +00:00
utils Regenerate all Makefile's after ios introduction and macos->macosclassic changes inside utils/fpcm/fpcmake.ini 2020-09-23 09:47:20 +00:00
x86 * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
x86_64 Merged revision(s) 42673, 47066, 47070 from trunk: 2020-11-25 22:20:21 +00:00
aasmbase.pas + support exporting labels from asm blocks in intel syntax asm blocks via the 2017-10-30 16:44:13 +00:00
aasmcfi.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
aasmcnst.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
aasmdata.pas The Important Ones: 2018-09-26 12:50:46 +00:00
aasmdef.pas
aasmsym.pas
aasmtai.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
aggas.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
aopt.pas
aoptbase.pas + define cpudelayslot: set during compiler compilation for CPUs having branch instructions with delay slot (MIPS, SPARC) 2017-08-20 17:20:38 +00:00
aoptda.pas
aoptobj.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
aoptutils.pas
assemble.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
blockutl.pas --- Merging r42998 into '.': 2019-11-10 16:12:48 +00:00
browcol.pas
catch.pas
ccharset.pas Merge of several commits related to enhancements in PPU writing 2019-11-04 08:50:42 +00:00
cclasses.pas * broken compilation after r39347 fixed 2018-06-30 12:30:25 +00:00
cfidwarf.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
cfileutl.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
cg64f32.pas
cgbase.pas -- Zusammenführen von r42272 in ».«: 2019-11-02 18:07:58 +00:00
cghlcpu.pas
cgobj.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
cgutils.pas * keep track of the temp position separately from the offset in references, 2018-04-22 17:03:16 +00:00
cmsgs.pas
comphook.pas --- Merging r40738 into '.': 2020-12-30 14:33:38 +00:00
compiler.pas --- Merging r44456 into '.': 2020-09-16 19:35:09 +00:00
compinnr.pas # revisions: 43409,43473,43474,43482 2020-01-14 13:28:25 +00:00
comprsrc.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
constexp.pas
COPYING.txt
cpid.pas
crefs.pas
cresstr.pas
cscript.pas * quote assembly filenames in Unix script, fixes sh errors with smartlinked small filenames like unitname(1), etc 2018-01-06 10:17:18 +00:00
cstreams.pas * broken compilation after r39347 fixed 2018-06-30 12:30:25 +00:00
cutils.pas * avoid overflows of execution weight 2018-08-16 20:45:36 +00:00
cwindirs.pp
dbgbase.pas * revert r37968: it does more harm than good 2018-01-15 16:41:22 +00:00
dbgcodeview.pas + added new debug output option -godwarfomflinnum for generating line number 2018-05-17 14:38:50 +00:00
dbgdwarf.pas -- Zusammenführen von r43183 in ».«: 2020-12-30 14:52:55 +00:00
dbgstabs.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
dbgstabx.pas
defcmp.pas --- Merging r45365 into '.': 2020-12-19 21:21:05 +00:00
defutil.pas --- Merging r43264 into '.': 2020-12-17 22:08:25 +00:00
dirparse.pas
elfbase.pas * The MaybeSwapXXXHeader functions moved from ogelf to the elfbase unit, so they 2018-06-14 13:01:08 +00:00
entfile.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
export.pas
expunix.pas
finput.pas
fmodule.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
fpccrc.pas
fpcdefs.inc ------------------------------------------------------------------------ 2019-02-05 07:43:20 +00:00
fpcp.pas
fpkg.pas Merged revision(s) 32508-32510, 32512 from branches/svenbarth/packages: 2016-04-15 14:42:24 +00:00
fppu.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
gendef.pas
globals.pas # revisions: 41710,41711,41733,41734,41735,41736,41737,41738,41739,41740,41741,41743,41744,41745,41746,41750,41751,41752,41753,41754,41755,41757,41758,41759 2019-05-04 21:45:55 +00:00
globstat.pas # revisions: 40702,40703,40704,40747,40750,40765,41277,41535,41536,41537,41548,41549,41770 2019-11-05 16:08:58 +00:00
globtype.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
hlcg2ll.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
hlcgobj.pas -- Zusammenführen von r44119 in ».«: 2020-10-22 19:38:01 +00:00
htypechk.pas Merged revision(s) 47634, 47655 from trunk: 2021-03-26 06:18:40 +00:00
impdef.pas
import.pas
ldscript.pas
link.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
macho.pas Merge of several commits related to enhancements in PPU writing 2019-11-04 08:50:42 +00:00
machoutils.pas Merge of several commits related to enhancements in PPU writing 2019-11-04 08:50:42 +00:00
Makefile --- Merging r48664 into '.': 2021-02-13 08:19:58 +00:00
Makefile.fpc --- Merging r48664 into '.': 2021-02-13 08:19:58 +00:00
MPWMake
msgidx.inc * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
msgtxt.inc * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
nadd.pas Merge of commits 43634 and 43635 for currency problems 2019-12-06 16:20:37 +00:00
nbas.pas --- Merging r44096 into '.': 2021-01-10 14:10:52 +00:00
ncal.pas -- Zusammenführen von r46973 in ».«: 2020-12-30 14:22:51 +00:00
ncgadd.pas
ncgbas.pas Merged revision(s) 47683, 47749 from trunk: 2020-12-17 15:22:03 +00:00
ncgcal.pas Remove multiple calls to cg.g_check_for_fpu_exception, only keep call to cg.maybe_check_for_fpu_exception (merging error) 2020-08-04 15:30:31 +00:00
ncgcnv.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
ncgcon.pas
ncgflw.pas Merged revision(s) 47683, 47749 from trunk: 2020-12-17 15:22:03 +00:00
ncghlmat.pas
ncginl.pas ncginl: another approach to fix the same issue #39184 supposed to address. keep left.resultdef, but try to make the target def always ordinal of an equal size, so it ends up in a data register on m68k 2018-06-07 06:43:02 +00:00
ncgld.pas Merge commits 46484 and 46487 to fix linux-powerpc64le snapshot generation. 2020-09-23 08:53:55 +00:00
ncgmat.pas + support mmx shifting 2018-02-27 21:40:12 +00:00
ncgmem.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
ncgnstfl.pas
ncgnstld.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
ncgnstmm.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
ncgobjc.pas
ncgopt.pas
ncgrtti.pas # revisions: 40702,40703,40704,40747,40750,40765,41277,41535,41536,41537,41548,41549,41770 2019-11-05 16:08:58 +00:00
ncgset.pas Merge of revisions 40277 2018-12-31 15:48:08 +00:00
ncgutil.pas --- Merging r43650 into '.': 2019-12-14 16:20:28 +00:00
ncgvmt.pas The Important Ones: 2018-09-26 12:50:46 +00:00
ncnv.pas --- Merging r43186 into '.': 2020-07-11 14:40:18 +00:00
ncon.pas -- Zusammenführen von r43620 in ».«: 2019-12-01 20:29:52 +00:00
nflw.pas -- Zusammenführen von r46974 in ».«: 2020-12-30 14:31:24 +00:00
ngenutil.pas # revisions: 45519,46865,46918 2020-10-11 15:53:29 +00:00
ngtcon.pas --- Merging r43186 into '.': 2020-07-11 14:40:18 +00:00
ninl.pas Merged revision(s) 44172, 44188, 45457 - 45458, 45645, 46218, 46953 from trunk: 2020-12-17 21:31:16 +00:00
nld.pas --- Merging r39877 into '.': 2018-11-12 08:36:43 +00:00
nmat.pas --- Merging r43264 into '.': 2020-12-17 22:08:25 +00:00
nmem.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
nobj.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
nobjc.pas * broken compilation after r39347 fixed 2018-06-30 12:30:25 +00:00
node.pas -- Zusammenführen von r39934 in ».«: 2020-11-15 14:05:21 +00:00
nopt.pas * moved nf_typedaddr to addrnodeflags (anf_typedaddr) 2018-04-03 16:41:01 +00:00
nset.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
nutils.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
objcasm.pas
objcdef.pas
objcgutl.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
objcutil.pas
ogbase.pas * patch by J. Gareth Moreton to fix 33909 2018-07-01 12:54:30 +00:00
ogcoff.pas Merged revision(s) 46875-46876 from trunk: 2020-11-25 22:25:26 +00:00
ogelf.pas * The MaybeSwapXXXHeader functions moved from ogelf to the elfbase unit, so they 2018-06-14 13:01:08 +00:00
oglx.pas
ogmacho.pas * changed type used for section alignment from byte/shortint to longint, so the 2017-10-25 15:47:29 +00:00
ogmap.pas
ognlm.pas * changed type used for section alignment from byte/shortint to longint, so the 2017-10-25 15:47:29 +00:00
ogomf.pas * Merged r40720 2019-01-02 04:27:06 +00:00
omfbase.pas Merge commits 39912, 39914, 40001, 40115, 40132 and 40163 2018-12-10 21:18:24 +00:00
optbase.pas Marge of more trunk fixes into fixes branch. 2018-12-23 22:27:05 +00:00
optconstprop.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
optcse.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
optdead.pas
optdeadstore.pas
optdfa.pas --- Merging r40202 into '.': 2019-01-01 21:59:57 +00:00
options.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
optloadmodifystore.pas
optloop.pas * do not unroll loops if the counter variable is accessed outside the current scope 2018-06-03 15:12:48 +00:00
opttail.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
optutils.pas * rest of the previous accidental partial commit 2019-02-07 19:56:21 +00:00
optvirt.pas
owar.pas
owbase.pas
owomflib.pas Merge commits 39912, 39914, 40001, 40115, 40132 and 40163 2018-12-10 21:18:24 +00:00
parabase.pas * removed temppos field again from parameter locations: they're not allocated 2018-04-27 19:18:55 +00:00
paramgr.pas * broken compilation after r39347 fixed 2018-06-30 12:30:25 +00:00
parser.pas * Merge r43604 to fix i8086-embedded utils compilation 2019-12-09 12:32:16 +00:00
pass_1.pas
pass_2.pas Merged revision(s) 47683, 47749 from trunk: 2020-12-17 15:22:03 +00:00
pbase.pas * a symbol might be specified using a partial namespace path as long as the missing part is a namespace symbol, 2018-05-05 17:18:45 +00:00
pcp.pas Merge of several commits related to enhancements in PPU writing 2019-11-04 08:50:42 +00:00
pdecl.pas # revisions: 44598,45635,45757,45764,45772 2020-07-24 21:09:00 +00:00
pdecobj.pas # revisions: 42328,42329 2019-11-05 16:22:23 +00:00
pdecsub.pas --- Merging r45972 into '.': 2020-12-17 21:47:29 +00:00
pdecvar.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
pexports.pas
pexpr.pas --- Merging r45365 into '.': 2020-12-19 21:21:05 +00:00
pgentype.pas
pgenutil.pas Merged revision(s) 44172, 44188, 45457 - 45458, 45645, 46218, 46953 from trunk: 2020-12-17 21:31:16 +00:00
pinline.pas Merged revision(s) 39802, 39816-39817 from trunk: 2020-11-25 21:24:41 +00:00
pkgutil.pas * check that the PPU version of a unit loaded for package adjustment matches exactly (we don't accept different versions when loading PPUs normally, so why should we with packages?) 2018-01-14 21:16:37 +00:00
pmodules.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
pp.lpi
pp.pas -- Aufzeichnung der Informationen für Zusammenführung von r43005 in ».«: 2019-11-09 22:07:33 +00:00
pparautl.pas --- Merging r42998 into '.': 2019-11-10 16:12:48 +00:00
ppc68k.lpi
ppc8086.lpi
ppcaarch64.lpi
ppcarm.lpi * version update 2018-01-31 18:52:18 +00:00
ppcavr.lpi + version update 2018-01-31 18:46:23 +00:00
ppcjvm.lpi
ppcmips.lpi
ppcmipsel.lpi
ppcppc64.lpi
ppcppc.lpi
ppcsparc64.lpi
ppcsparc.lpi
ppcx64.lpi Merged revision(s) 47634, 47655 from trunk: 2021-03-26 06:18:40 +00:00
ppcx64llvm.lpi * made lazarus project names more systematic 2017-12-28 14:34:04 +00:00
ppheap.pas
ppu.pas Merge of several commits related to enhancements in PPU writing 2019-11-04 08:50:42 +00:00
procdefutil.pas Merged revision(s) 44172, 44188, 45457 - 45458, 45645, 46218, 46953 from trunk: 2020-12-17 21:31:16 +00:00
procinfo.pas Merge commits 42525 and 45891 that add 2020-08-04 10:30:50 +00:00
pstatmnt.pas --- Merging r43347 into '.': 2019-11-16 15:18:43 +00:00
psub.pas Merged revision(s) 47683, 47749 from trunk: 2020-12-17 15:22:03 +00:00
psystem.pas # revisions: 43409,43473,43474,43482 2020-01-14 13:28:25 +00:00
ptconst.pas
ptype.pas Merged revision(s) 47794-47795, 47826 from trunk: 2021-02-11 21:30:38 +00:00
raatt.pas # revisions: 39998, requested by Pierre. 2019-05-06 09:41:54 +00:00
rabase.pas
rasm.pas * forgotten comment 2018-02-06 21:38:51 +00:00
rautils.pas --- Merging r46880 into '.': 2020-12-11 15:40:07 +00:00
README.txt
rescmn.pas
rgbase.pas
rgobj.pas * avoid overflows of execution weight 2018-08-16 20:45:36 +00:00
scandir.pas --- Merging r43264 into '.': 2020-12-17 22:08:25 +00:00
scanner.pas --- Merging r43264 into '.': 2020-12-17 22:08:25 +00:00
switches.pas * allow $MinEnumSize, $PackSet and $PackRecords to be used with $Push and $Pop 2018-06-12 19:40:45 +00:00
symbase.pas # revisions: 43566,43567,43568,43586,43629,43823 2020-01-14 10:41:39 +00:00
symconst.pas * Objective-Pascal inferred result type and improved category method searching 2019-08-31 11:43:41 +00:00
symcreat.pas --- Merging r42998 into '.': 2019-11-10 16:12:48 +00:00
symdef.pas Merged revision(s) 47794-47795, 47826 from trunk: 2021-02-11 21:30:38 +00:00
symsym.pas Merged revision(s) 47634, 47655 from trunk: 2021-03-26 06:18:40 +00:00
symtable.pas Merged revision(s) 47634, 47655 from trunk: 2021-03-26 06:18:40 +00:00
symtype.pas Merge of several commits related to enhancements in PPU writing 2019-11-04 08:50:42 +00:00
symutil.pas --- Merging r42998 into '.': 2019-11-10 16:12:48 +00:00
syscinfo.pas Add arm-palmos target to list supporting po_syscall 2017-09-15 20:25:59 +00:00
systems.inc * Merge commit #45720 2020-09-29 14:53:00 +00:00
systems.pas * Merge commit #45720 2020-09-29 14:53:00 +00:00
tgobj.pas Merge of commits 39916, 39925 and 39963 2019-01-10 12:22:58 +00:00
tokens.pas Merged revision(s) 43114-43115, 46943 from trunk: 2020-11-25 22:42:41 +00:00
triplet.pas * merged macOS/AArch64 support + revisions these changes depended on 2020-09-15 19:40:36 +00:00
verbose.pas
version.pas * fixes to 3.2.1 2020-06-20 16:47:24 +00:00
widestr.pas
wpo.pas
wpobase.pas
wpoinfo.pas

This directory contains the sources of the Free Pascal Compiler

If you want to compile/modify the compiler, please read first the
programmers manual.

To recompile the compiler, you can use the batch files :
 + mppc386.bat    if you want to build a cross compiler from i386 to m68k
 + mppcsparc      if you want to build a cross compiler from i386 to SPARC
 
 or
Use the make utility as following
  
      make OS_TARGET="compiler OS target" \
      CPU_TARGET="compiler CPU target" \
      FPCCPUOPT="Optimization level" \
      PP="compiler used to compile FPC" \
      COMPILER_OPTIONS="Options passed to compiler" \
      
      
If an option is omitted, then target CPU/OS will be same as current CPU/OS
 
Possibles targets are : linux go32v2 win32 os2 freebsd beos netbsd amiga haiku
atari sunos qnx netware openbsd wdosx palmos macos macosx emx
   
Possible compiler switches (* marks a currently required switch):
  -----------------------------------------------------------------
  GDB*                support of the GNU Debugger
  I386                generate a compiler for the Intel i386+
  x86_64              generate a compiler for the AMD x86-64 architecture
  M68K                generate a compiler for the M68000
  SPARC               generate a compiler for SPARC
  POWERPC             generate a compiler for the PowerPC
  VIS                 generate a compile for the VIS
  DEBUG               version with debug code is generated
  EXTDEBUG            some extra debug code is executed
  SUPPORT_MMX         only i386: releases the compiler switch
                      MMX which allows the compiler to generate
                      MMX instructions
  EXTERN_MSG          Don't compile the msgfiles in the compiler, always
                      use external messagefiles, default for TP
  NOAG386INT          no Intel Assembler output
  NOAG386NSM          no NASM output
  NOAG386BIN          leaves out the binary writer, default for TP
  NORA386DIR          No direct i386 assembler reader
  TEST_GENERIC        Test Generic version of code generator
                      (uses generic RTL calls)
  -----------------------------------------------------------------
  cpuflags            The target processor has status flags (on by default)
  cpufpemu            The target compiler will also support emitting software
                       floating point operations
  cpu64bitaddr        The targets use a 64-bit address space (pointers and
                       the default integer type are 64 bit)
  cpu64bitalu         The target cpu has 64-bit registers available (unless
                       cpu64bitaddr is also defined, pointers and default
                       integer type remain 32 bit, but the cpu can perform
                       64 bit calculations directly without needing helpers)
  -----------------------------------------------------------------

  Required switches for a i386 compiler be compiled by Free Pascal Compiler:
  GDB;I386

to build a compiler to SPARC target using a Win32/i386 you just use :
      make CPU_TARGET=SPARC