mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 11:08:02 +02:00
* fixed a number of (mostly false) warnings regarding uninitialised
variables with -Oodfa git-svn-id: branches/hlcgllvm@30244 -
This commit is contained in:
parent
bc7ba58798
commit
765044aede
@ -997,7 +997,9 @@ implementation
|
||||
datatcb.emit_tai(Tai_label.Create(result.lab),widecharpointertype);
|
||||
{ allocate a separate label for the start of the data }
|
||||
current_asmdata.getdatalabel(startlab);
|
||||
end;
|
||||
end
|
||||
else
|
||||
internalerror(2015031502);
|
||||
result.ofs:=string_symofs;
|
||||
end
|
||||
else
|
||||
|
@ -849,6 +849,9 @@ implementation
|
||||
invert:=a=0;
|
||||
OC_NE:
|
||||
invert:=a=1;
|
||||
else
|
||||
{ avoid uninitialised warning }
|
||||
internalerror(2015031504);
|
||||
end;
|
||||
current_asmdata.getjumplabel(falselab);
|
||||
fallthroughlab:=falselab;
|
||||
|
@ -77,6 +77,7 @@ interface
|
||||
);
|
||||
|
||||
llvm_fpcond2str: array[tllvmfpcmp] of ansistring = (
|
||||
'invalid',
|
||||
'false',
|
||||
'oeq', 'ogt', 'oge', 'olt', 'ole', 'one', 'ord',
|
||||
'ueq', 'ugt', 'uge', 'ult', 'ule', 'une', 'uno',
|
||||
|
@ -84,6 +84,7 @@ interface
|
||||
|
||||
type
|
||||
tllvmfpcmp = (
|
||||
lfc_invalid,
|
||||
lfc_false,
|
||||
lfc_oeq, lfc_ogt, lfc_oge, lfc_olt, lfc_ole, lfc_one, lfc_ord,
|
||||
lfc_ueq, lfc_ugt, lfc_uge, lfc_ult, lfc_ule, lfc_une, lfc_uno,
|
||||
|
@ -166,6 +166,8 @@ implementation
|
||||
cmpop:=OC_EQ;
|
||||
unequaln:
|
||||
cmpop:=OC_NE;
|
||||
else
|
||||
internalerror(2015031505);
|
||||
end;
|
||||
if nf_swapped in flags then
|
||||
cmpop:=swap_opcmp(cmpop);
|
||||
@ -206,6 +208,8 @@ implementation
|
||||
|
||||
cmpop:=false;
|
||||
singleprec:=tfloatdef(left.resultdef).floattype=s32real;
|
||||
{ avoid uninitialised warning }
|
||||
llvmfpcmp:=lfc_invalid;
|
||||
case nodetype of
|
||||
addn :
|
||||
op:=la_fadd;
|
||||
@ -233,6 +237,8 @@ implementation
|
||||
llvmfpcmp:=lfc_oeq;
|
||||
unequaln:
|
||||
llvmfpcmp:=lfc_one;
|
||||
else
|
||||
internalerror(2015031506);
|
||||
end;
|
||||
end;
|
||||
else
|
||||
|
@ -140,6 +140,8 @@ implementation
|
||||
locref:=nil;
|
||||
if not arraytopointerconverted then
|
||||
begin
|
||||
{ avoid uninitialised warning }
|
||||
arrptrelementdef:=nil;
|
||||
{ the result is currently a pointer to left.resultdef (the array type)
|
||||
-> convert it into a pointer to an element inside this array }
|
||||
getarrelementptrdef;
|
||||
@ -153,6 +155,8 @@ implementation
|
||||
if (resultdef.typ=floatdef) and
|
||||
(tfloatdef(resultdef).floattype=s80real) then
|
||||
begin
|
||||
{ avoid uninitialised warning }
|
||||
arrptrelementdef:=nil;
|
||||
getarrelementptrdef;
|
||||
hreg:=hlcg.getaddressregister(current_asmdata.CurrAsmList,getpointerdef(resultdef));
|
||||
hlcg.a_load_reg_reg(current_asmdata.CurrAsmList,arrptrelementdef,getpointerdef(resultdef),locref^.base,hreg);
|
||||
|
@ -109,7 +109,10 @@ implementation
|
||||
begin
|
||||
oldfileinfo:=current_filepos;
|
||||
current_filepos:=current_procinfo.procdef.fileinfo;
|
||||
end;
|
||||
end
|
||||
else
|
||||
{ avoid uninitialised warning later }
|
||||
oldfileinfo.line:=0;
|
||||
alloclist.concat(taillvm.op_ref_size(la_alloca,ref,def));
|
||||
if assigned(current_procinfo) then
|
||||
current_filepos:=oldfileinfo;
|
||||
|
@ -565,6 +565,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
|
||||
begin
|
||||
ll.lab:=nil;
|
||||
ll.ofs:=0;
|
||||
winlike:=false;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
@ -4052,6 +4052,7 @@ implementation
|
||||
inherited create(n,recorddef);
|
||||
{ if we specified a name, then we'll probably want to look up the
|
||||
type again by name too -> create typesym }
|
||||
ts:=nil;
|
||||
if definedname then
|
||||
begin
|
||||
ts:=ctypesym.create(n,self);
|
||||
|
Loading…
Reference in New Issue
Block a user