Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-05

Internal error 200502052

2 messages · 1 person · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Coco Pascal

I get an internal error 200502052 when building a library on fc10 with lazarus 0.9.26.2/fpc 2.2.2 and a recent nightly build with fpc 2.2.4. It is raised by the following procedure from aasmtai.pas:

    procedure tai_cpu_abstract.loadref(opidx:longint;const r:treference);
      begin
        allocate_oper(opidx+1);
        with oper[opidx]^ do
          begin
            if typtop_ref then
              begin
                clearop(opidx);
                new(ref);
              end;
            ref^:=r;
{$ifdef x86}
            { We allow this exception for x86, since overloading this
would be
              too much of a a speed penalty}
            if (ref^.segmentNR_NO) and (ref^.segmentNR_DS) then
              segprefix:=ref^.segment;
{$endif}
            if (cs_create_pic in current_settings.moduleswitches) and
              assigned(r.symbol) and
              not assigned(r.relsymbol) and
              (r.refaddr=addr_no) then
              internalerror(200502052);
            typ:=top_ref;
            if assigned(add_reg_instruction_hook) then
              begin
                add_reg_instruction_hook(self,ref^.base);
                add_reg_instruction_hook(self,ref^.index);
              end;
            { mark symbol as used }
            if assigned(ref^.symbol) then
              ref^.symbol.increfs;
            if assigned(ref^.relsymbol) then
              ref^.relsymbol.increfs;
          end;
      end;

Could somebody please explain what is happening here so I can make a small test project for a bugreport?

Coco Pascal
to Coco Pascal
Coco Pascal wrote 44 lines
I get an internal error 200502052 when building a library on fc10 with lazarus 0.9.26.2/fpc 2.2.2 and a recent nightly build with fpc 2.2.4. It is raised by the following procedure from aasmtai.pas: procedure tai_cpu_abstract.loadref(opidx:longint;const r:treference); begin allocate_oper(opidx+1); with oper[opidx]^ do begin if typtop_ref then begin clearop(opidx); new(ref); end; ref^:=r; {$ifdef x86} { We allow this exception for x86, since overloading this would be too much of a a speed penalty} if (ref^.segmentNR_NO) and (ref^.segmentNR_DS) then segprefix:=ref^.segment; {$endif} if (cs_create_pic in current_settings.moduleswitches) and assigned(r.symbol) and not assigned(r.relsymbol) and (r.refaddr=addr_no) then internalerror(200502052); typ:=top_ref; if assigned(add_reg_instruction_hook) then begin add_reg_instruction_hook(self,ref^.base); add_reg_instruction_hook(self,ref^.index); end; { mark symbol as used } if assigned(ref^.symbol) then ref^.symbol.increfs; if assigned(ref^.relsymbol) then ref^.relsymbol.increfs; end; end; Could somebody please explain what is happening here so I can make a small test project for a bugreport?

Filed bug report: http://bugs.freepascal.org/view.php?id=13842