Browse Source

+ also fold nil nodes when used as pointer constants

florian 1 year ago
parent
commit
5c46b5116d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/nadd.pas

+ 2 - 2
compiler/nadd.pas

@@ -687,12 +687,12 @@ implementation
              (allowenumop(nodetype) or (nf_internal in flags))
             ) or
             (
-             (lt = pointerconstn) and
+             (lt in [pointerconstn,niln]) and
              is_constintnode(right) and
              (nodetype in [addn,subn])
             ) or
             (
-             (rt = pointerconstn) and
+             (rt in [pointerconstn,niln]) and
              is_constintnode(left) and
              (nodetype=addn)
             ) or