* fixed stabs generation for static class variables

git-svn-id: trunk@3614 -
This commit is contained in:
florian 2006-05-21 17:34:30 +00:00
parent 6dde68da3a
commit 3261281184
3 changed files with 32 additions and 0 deletions

1
.gitattributes vendored
View File

@ -6821,6 +6821,7 @@ tests/webtbs/tw5015.pp svneol=native#text/plain
tests/webtbs/tw5023.pp svneol=native#text/plain
tests/webtbs/tw5036.pp svneol=native#text/plain
tests/webtbs/tw5082.pp -text svneol=unset#text/plain
tests/webtbs/tw6435.pp svneol=native#text/plain
tests/webtbs/tw6491.pp svneol=native#text/plain
tests/webtbs/tw6624.pp svneol=native#text/plain
tests/webtbs/tw6684.pp svneol=native#text/plain

View File

@ -163,6 +163,7 @@ interface
constructor create(const n : string;vsp:tvarspez;const tt : ttype;vopts:tvaroptions);
constructor ppuload(ppufile:tcompilerppufile);
procedure ppuwrite(ppufile:tcompilerppufile);override;
function mangledname:string;override;
end;
tabstractnormalvarsym = class(tabstractvarsym)
@ -1416,6 +1417,22 @@ implementation
end;
function tfieldvarsym.mangledname:string;
var
srsym : tsym;
srsymtable : tsymtable;
begin
if sp_static in symoptions then
begin
searchsym(lower(owner.name^)+'_'+name,srsym,srsymtable);
if assigned(srsym) then
result:=srsym.mangledname;
end
else
result:=inherited mangledname;
end;
{****************************************************************************
TABSTRACTNORMALVARSYM
****************************************************************************}

14
tests/webtbs/tw6435.pp Normal file
View File

@ -0,0 +1,14 @@
{ %OPT=-gl }
program Project1;
{$mode objfpc}{$H+}{$static on}
type
MyClass = class(TObject)
private
FClassVar: integer; static;
end;
begin
end.