From fd844d08e0bbd27459ea6d2968f2484773f5a6bc Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 12 Sep 2012 14:06:48 +0000 Subject: [PATCH] Avoid wrong typecast in DoReplace function as revealed by extcycle git-svn-id: trunk@22376 - --- compiler/ncgutil.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index dc7b807122..a2971c2fef 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -1739,7 +1739,8 @@ implementation case n.nodetype of loadn: begin - if (tabstractvarsym(tloadnode(n).symtableentry).varoptions * [vo_is_dll_var, vo_is_thread_var] = []) and + if tloadnode(n).symtableentry.inheritsfrom(tabstractvarsym) and + (tabstractvarsym(tloadnode(n).symtableentry).varoptions * [vo_is_dll_var, vo_is_thread_var] = []) and not assigned(tloadnode(n).left) and ((tloadnode(n).symtableentry <> rr^.ressym) or not(fc_exit in flowcontrol)