mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 20:50:32 +02:00
--- Merging r40202 into '.':
U compiler/ncal.pas U compiler/optdfa.pas A tests/webtbs/tw34438.pp --- Recording mergeinfo for merge of r40202 into '.': U . git-svn-id: branches/fixes_3_2@40740 -
This commit is contained in:
parent
f7782641ad
commit
0ad0cefeb3
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -16270,6 +16270,7 @@ tests/webtbs/tw3435.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw34380.pp svneol=native#text/plain
|
tests/webtbs/tw34380.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3441.pp svneol=native#text/plain
|
tests/webtbs/tw3441.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3443.pp svneol=native#text/plain
|
tests/webtbs/tw3443.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw34438.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3444.pp svneol=native#text/plain
|
tests/webtbs/tw3444.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3456.pp svneol=native#text/plain
|
tests/webtbs/tw3456.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3457.pp svneol=native#text/plain
|
tests/webtbs/tw3457.pp svneol=native#text/plain
|
||||||
|
@ -4849,10 +4849,15 @@ implementation
|
|||||||
ptrtype: tdef;
|
ptrtype: tdef;
|
||||||
tempnode: ttempcreatenode;
|
tempnode: ttempcreatenode;
|
||||||
paraaddr: taddrnode;
|
paraaddr: taddrnode;
|
||||||
|
isfuncretnode : boolean;
|
||||||
begin
|
begin
|
||||||
ptrtype:=cpointerdef.getreusable(para.left.resultdef);
|
ptrtype:=cpointerdef.getreusable(para.left.resultdef);
|
||||||
tempnode:=ctempcreatenode.create(ptrtype,ptrtype.size,tt_persistent,true);
|
tempnode:=ctempcreatenode.create(ptrtype,ptrtype.size,tt_persistent,true);
|
||||||
addstatement(inlineinitstatement,tempnode);
|
addstatement(inlineinitstatement,tempnode);
|
||||||
|
isfuncretnode:=nf_is_funcret in para.left.flags;
|
||||||
|
if isfuncretnode then
|
||||||
|
addstatement(inlinecleanupstatement,ctempdeletenode.create_normal_temp(tempnode))
|
||||||
|
else
|
||||||
addstatement(inlinecleanupstatement,ctempdeletenode.create(tempnode));
|
addstatement(inlinecleanupstatement,ctempdeletenode.create(tempnode));
|
||||||
{ inherit addr_taken flag }
|
{ inherit addr_taken flag }
|
||||||
if (tabstractvarsym(para.parasym).addr_taken) then
|
if (tabstractvarsym(para.parasym).addr_taken) then
|
||||||
@ -4865,6 +4870,8 @@ implementation
|
|||||||
addstatement(inlineinitstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
|
addstatement(inlineinitstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
|
||||||
paraaddr));
|
paraaddr));
|
||||||
para.left:=cderefnode.create(ctemprefnode.create(tempnode));
|
para.left:=cderefnode.create(ctemprefnode.create(tempnode));
|
||||||
|
if isfuncretnode then
|
||||||
|
Include(para.left.flags,nf_is_funcret);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -383,6 +383,7 @@ unit optdfa;
|
|||||||
temprefn,
|
temprefn,
|
||||||
loadn,
|
loadn,
|
||||||
typeconvn,
|
typeconvn,
|
||||||
|
derefn,
|
||||||
assignn:
|
assignn:
|
||||||
begin
|
begin
|
||||||
if not(assigned(node.optinfo^.def)) and
|
if not(assigned(node.optinfo^.def)) and
|
||||||
|
42
tests/webtbs/tw34438.pp
Normal file
42
tests/webtbs/tw34438.pp
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{%norun}
|
||||||
|
{$mode objfpc}
|
||||||
|
uses
|
||||||
|
types,math;
|
||||||
|
|
||||||
|
type
|
||||||
|
PGtkWidget = pointer;
|
||||||
|
PGtkNotebook = pointer;
|
||||||
|
|
||||||
|
function MyRect(Left,Top,Right,Bottom : Integer) : TRect; inline;
|
||||||
|
|
||||||
|
begin
|
||||||
|
MyRect.Left:=Left;
|
||||||
|
MyRect.Top:=Top;
|
||||||
|
MyRect.Right:=Right;
|
||||||
|
MyRect.Bottom:=Bottom;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetWidgetClientRect(TheWidget: PGtkWidget): TRect;
|
||||||
|
var
|
||||||
|
Widget, ClientWidget: PGtkWidget;
|
||||||
|
AChild: PGtkWidget;
|
||||||
|
|
||||||
|
procedure GetNoteBookClientRect(NBWidget: PGtkNotebook);
|
||||||
|
var
|
||||||
|
PageIndex: LongInt;
|
||||||
|
PageWidget: PGtkWidget;
|
||||||
|
FrameBorders: TRect;
|
||||||
|
aWidth: LongInt;
|
||||||
|
aHeight: LongInt;
|
||||||
|
begin
|
||||||
|
Result:=MyRect(0,0,
|
||||||
|
Max(0,AWidth-FrameBorders.Left-FrameBorders.Right),
|
||||||
|
Max(0,aHeight-FrameBorders.Top-FrameBorders.Bottom));
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user