Fix 20093 bug report

git-svn-id: trunk@18922 -
This commit is contained in:
pierre 2011-08-31 16:20:40 +00:00
parent d443fafc3c
commit 041f3d0222
2 changed files with 9 additions and 1 deletions

View File

@ -930,7 +930,7 @@ implementation
if prefix<>'' then if prefix<>'' then
result:=result+'_'+prefix; result:=result+'_'+prefix;
if suffix<>'' then if suffix<>'' then
result:=result+'_'+suffix; result:=result+'_$'+suffix;
{ the Darwin assembler assumes that all symbols starting with 'L' are local } { the Darwin assembler assumes that all symbols starting with 'L' are local }
{ Further, the Mac OS X 10.5 linker does not consider symbols which do not } { Further, the Mac OS X 10.5 linker does not consider symbols which do not }
{ start with '_' as regular symbols (it does not generate N_GSYM entries } { start with '_' as regular symbols (it does not generate N_GSYM entries }

View File

@ -8,6 +8,9 @@
{ Use same name as unit to test also { Use same name as unit to test also
possible confusion there } possible confusion there }
{ Test should not fail anymore after this change
dated 2011-08-31 PM }
{$mode objfpc} {$mode objfpc}
program vmt_uvmt; program vmt_uvmt;
@ -15,6 +18,7 @@ program vmt_uvmt;
uses uses
uvmt, uvmt_a; uvmt, uvmt_a;
{$ifndef VAR_ONLY}
type type
tclass = class(tobject) tclass = class(tobject)
end; end;
@ -26,6 +30,8 @@ var
a2 : uvmt.a_tclass; a2 : uvmt.a_tclass;
a3 : tclass; a3 : tclass;
a4 : a_tclass; a4 : a_tclass;
{$endif ndef VAR_ONLY}
var
t : longint; t : longint;
begin begin
t:=6; t:=6;
@ -40,6 +46,7 @@ begin
Writeln('Both variables are at same address'); Writeln('Both variables are at same address');
halt(1); halt(1);
end; end;
{$ifndef VAR_ONLY}
a1 := uvmt_a.tclass.create; a1 := uvmt_a.tclass.create;
a2 := uvmt.a_tclass.create; a2 := uvmt.a_tclass.create;
a3 := tclass.create; a3 := tclass.create;
@ -48,4 +55,5 @@ begin
a2.destroy; a2.destroy;
a3.destroy; a3.destroy;
a4.destroy; a4.destroy;
{$endif ndef VAR_ONLY}
end. end.