x.pas(8503,8) Fatal: Internal error 2005091810
Original Reporter info from Mantis: mankatob
-
Reporter name: dan donk
Original Reporter info from Mantis: mankatob
- Reporter name: dan donk
Description:
My program has some functions and procedures
embedded in other functions and procedures
embedded in other functions and procedures
and I like to use long type names and descriptive function/procedure names
and I think the linker likes to use names like
function_name_one_inside_function_name_two_inside_function_name_three_with_argument1type_with_a_long_name_and_argument2_with_a_longer_name
and I think this overwhelms the 255 character string making it impossible to distinguish one function from another since there is, in all probability, no string overflow range check
in any case, if there were an abstraction
in a table such as:
LINKER
NAME
INSTEADOF
"t1"programmer's type named "variablePointerToRecordNameBizzarrelyLongName"
"t2"programmer's type named "variablePointerToRecordThatIsDifferentButLong"
...
"f1"programmer joey's function named "reallylongname"
It would be possible to rid the compiler of this bane that has prevented so many programmers from giving up w32010 which handles this quite nicely.
--------------------------------------------------------------------
Another possibility is that this error indicates "too many literal strings" since w32010 chokes on that very thing. Strings such as the null string are given 256 characters if they are passed to a function expecting a string. Ironically, the null string need only take one byte since that is the length which is zero. LITERAL strings need only take the (number of bytes of their length + 1) since they do not change. The number of bytes may have to be rounded to an even byte number or even multiple of the natural 'int' for the machine type but guys, a byte saved can make all the difference!
Steps to reproduce:
compile and run "comptest"
it will make a file called "junk.pas"
fp2 junk
you will see the errors
compile with w32010
you will not see errors
Additional information:
program comptest(infile,outfile,input,output);
const
MAXFNS=30;
MAXSTRINGLENGTH=255;
typex='extremelylongtypenamethatsomeguywantstocallitinspiteofyourpredilections';
fnx=typex+'function';
type
stringx = string[MAXSTRINGLENGTH];
var
outfile : text;
procedure makeFn(depth:integer);
begin(*makeFn*)
writeln(outfile,'function ',fnx,depth:0);
writeln(outfile,'(var varone:',typex,';');
writeln(outfile,'vartwo:',typex,'):',typex,';');
writeln(outfile,'var');
writeln(outfile,' varthree:',typex,';');
if depth>0 then
makeFn(depth-1);
writeln(outfile,'begin(','*',fnx,depth:0,'*',')');
if depth>0 then
writeln(outfile,'varthree := ',fnx,(depth-1):0,'(varone,vartwo);')
else
writeln(outfile,'varthree := 1;');
if depth>0 then
writeln(outfile,fnx,depth:0,' := ',fnx,(depth-1):0,'(varone,varthree)')
else
writeln(outfile,fnx,depth:0,' := 1');
writeln(outfile,'end;(','*',fnx,depth:0,'*',')');
end;(*makeFn*)
begin(*comptest*)
assign(outfile,'junk.pas');
rewrite(outfile);
writeln(outfile,'program test;');
writeln(outfile,'type');
writeln(outfile,' ',typex,'=longword;');
writeln(outfile,'var');
writeln(outfile,' varone:',typex,';');
makeFn(MAXFNS);
writeln(outfile,'begin(','*program*',')');
writeln(outfile,'varone := 1;');
writeln(outfile,'writeln(',fnx,MAXFNS:0,'(varone,2))');
writeln(outfile,'end.(','*program*',')');
close(outfile);
end.(*comptest*)
----------------------------------------------------
C:\laptop\dan\cpre>C:\FPC\2.2.0\bin\i386-win32\fpc -WC -gl -dnocatch -gh -gl -St -O3 -Sm junk
Free Pascal Compiler version 2.2.4 [2009/04/10] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling junk.pas
junk.pas(160,3) Note: Local variable "varthree" is assigned but never used
junk.pas(272,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(268,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(264,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(260,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(256,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(252,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(248,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(244,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(240,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(236,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(232,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(228,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(224,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(220,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(216,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(212,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(208,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(204,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(200,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(196,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(192,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(188,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(184,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(180,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(176,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(172,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(168,1) Error: Asm: Duplicate label PTEST_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION30
crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPREDILECTIONSFUNCTION29$crcFD909EEE_EXTREMELYLONGTYPENAMETHATSOMEGUYWANTSTOCALLITINSPITEOFYOURPR
junk.pas(288,1) Fatal: There were 27 errors compiling module, stopping
Fatal: Compilation aborted
Error: C:\FPC\2.2.0\bin\i386-win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)
C:\laptop\dan\cpre>rem C:\pp\bin\win32\fpc -gl -dnocatch -gh -gl -St -O3 junk
C:\laptop\dan\cpre>rem -FeERROR.TXT -V -WC junk
C:\laptop\dan\cpre>rem range checking -Cr $r
C:\laptop\dan\cpre>rem overflow check -Co $q
Mantis conversion info:
- Mantis ID: 15203
- OS: xp
- OS Build: sp4
- Build: don't know
- Platform: windows
- Version: 2.2.4
- Fixed in version: 2.6.0
- Fixed in revision: 14515 (#81f34dd4)