mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 04:49:42 +01:00
* Added test for double library entry with same name
git-svn-id: trunk@17776 -
This commit is contained in:
parent
1d8851f0eb
commit
c2b9bec684
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -9634,6 +9634,9 @@ tests/test/cg/variants/tvarol96.pp svneol=native#text/plain
|
|||||||
tests/test/dumpclass.pp svneol=native#text/plain
|
tests/test/dumpclass.pp svneol=native#text/plain
|
||||||
tests/test/dumpmethods.pp svneol=native#text/plain
|
tests/test/dumpmethods.pp svneol=native#text/plain
|
||||||
tests/test/lcpref.inc svneol=native#text/plain
|
tests/test/lcpref.inc svneol=native#text/plain
|
||||||
|
tests/test/library/tlib1a.pp svneol=native#text/plain
|
||||||
|
tests/test/library/tlib1a2.pp svneol=native#text/plain
|
||||||
|
tests/test/library/tlib1b.pp svneol=native#text/plain
|
||||||
tests/test/opt/README.txt svneol=native#text/plain
|
tests/test/opt/README.txt svneol=native#text/plain
|
||||||
tests/test/opt/tarmshift.pp svneol=native#text/plain
|
tests/test/opt/tarmshift.pp svneol=native#text/plain
|
||||||
tests/test/opt/tcaseopt1.pp svneol=native#text/plain
|
tests/test/opt/tcaseopt1.pp svneol=native#text/plain
|
||||||
|
|||||||
14
tests/test/library/tlib1a.pp
Normal file
14
tests/test/library/tlib1a.pp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ %skiptarget=go32v2 }
|
||||||
|
{ %norun }
|
||||||
|
{$goto on}
|
||||||
|
library tlib1a;
|
||||||
|
|
||||||
|
procedure p(var a : dword);
|
||||||
|
begin
|
||||||
|
a:=1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
exports p;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
14
tests/test/library/tlib1a2.pp
Normal file
14
tests/test/library/tlib1a2.pp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ %skiptarget=go32v2 }
|
||||||
|
{ %norun }
|
||||||
|
{$goto on}
|
||||||
|
library tlib1a2;
|
||||||
|
|
||||||
|
procedure p(var a : dword);
|
||||||
|
begin
|
||||||
|
a:=2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
exports p;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
31
tests/test/library/tlib1b.pp
Normal file
31
tests/test/library/tlib1b.pp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ %skiptarget=go32v2 }
|
||||||
|
{ %needlibrary }
|
||||||
|
{$goto on}
|
||||||
|
|
||||||
|
|
||||||
|
{ Checks that the two functions with the same exported name 'p'
|
||||||
|
are each loaded correctly. }
|
||||||
|
uses
|
||||||
|
{$ifdef unix}dl,{$endif unix}sysutils;
|
||||||
|
|
||||||
|
{$ifdef darwin}
|
||||||
|
{$linklib tlib1a}
|
||||||
|
{$linklib tlib1a2}
|
||||||
|
{$endif darwin}
|
||||||
|
|
||||||
|
procedure p(var a : dword);external 'tlib1a' name 'p';
|
||||||
|
procedure p2(var a : dword);external 'tlib1a2' name 'p';
|
||||||
|
|
||||||
|
var
|
||||||
|
a : dword;
|
||||||
|
begin
|
||||||
|
a:=0;
|
||||||
|
p(a);
|
||||||
|
if a <> 1 then
|
||||||
|
halt(1);
|
||||||
|
p2(a);
|
||||||
|
if a <> 2 then
|
||||||
|
halt(2);
|
||||||
|
|
||||||
|
writeln('ok');
|
||||||
|
end.
|
||||||
Loading…
Reference in New Issue
Block a user