Browse Source

* give internalerror if trying to take the address of something else
than a LOC_REFERENCE or LOC_CREFERENCE

git-svn-id: trunk@5408 -

Jonas Maebe 18 years ago
parent
commit
e04e668640
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/ncgmem.pas

+ 2 - 0
compiler/ncgmem.pas

@@ -172,6 +172,8 @@ implementation
 
          location_reset(location,LOC_REGISTER,OS_ADDR);
          location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
+         if not(left.location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
+           internalerror(2006111510);
          cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,left.location.reference,location.register);
       end;