fpc/tests/webtbs/tw11290.pp
Jonas Maebe 6ac63bcafe * also process tcallnode.funcretnode in nutils.foreachnode*(),needed
for properly synchronizing regvars after loops. The absense of this
    causes the crash in the test program of mantis  under 2.2.1,
    and while it doesn't crash under 2.3.1 due to differences in the
    code generation, the bug could cause errors in other situations
    here as well)

git-svn-id: trunk@10959 -
2008-05-12 20:50:43 +00:00

38 lines
818 B
ObjectPascal

program optimiav;
//compile with -OG2p3
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
{$ifdef mswindows}{$apptype console}{$endif}
uses
{$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}
sysutils;
type
stringarty = array of string;
ttestclass = class
private
fignoreexceptionclasses: stringarty;
public
procedure setignoreexceptionclasses(const avalue: stringarty);
end;
procedure ttestclass.setignoreexceptionclasses(const avalue: stringarty);
var
int1: integer;
begin
setlength(fignoreexceptionclasses,length(avalue));
for int1:= 0 to high(avalue) do begin
fignoreexceptionclasses[int1]:= uppercase(avalue[int1]);
end;
end;
var
testclass1: ttestclass;
ar1: stringarty;
begin
testclass1:= ttestclass.create;
setlength(ar1,2);
testclass1.setignoreexceptionclasses(ar1);
testclass1.free;
end.