From 68303b8df1918f0bb5cdfce6e1991e4be5098777 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Mon, 23 Feb 2015 22:47:35 +0000 Subject: [PATCH] * add explicit check that argument of sizeof(x) is a simple load node (this was already assumed later on) git-svn-id: trunk@29816 - --- compiler/ninl.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/ninl.pas b/compiler/ninl.pas index 650a597df5..33b68e0d3a 100644 --- a/compiler/ninl.pas +++ b/compiler/ninl.pas @@ -2631,6 +2631,10 @@ implementation if (left.resultdef.typ<>undefineddef) and paramanager.push_high_param(vs_value,left.resultdef,current_procinfo.procdef.proccalloption) then begin + { this should be an open array or array of const, both of + which can only be simple load nodes of parameters } + if left.nodetype<>loadn then + internalerror(2014120701); hightree:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry)); if assigned(hightree) then begin