mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 08:19:36 +01:00 
			
		
		
		
	for properly synchronizing regvars after loops. The absense of this
    causes the crash in the test program of mantis #11290 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 -
		
	
			
		
			
				
	
	
		
			38 lines
		
	
	
		
			818 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			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.
 | 
						|
 |