Browse Source

* don't typecast the localst of the main program to a localsymtable

git-svn-id: trunk@6188 -
Jonas Maebe 18 years ago
parent
commit
fae803869f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/psub.pas

+ 2 - 0
compiler/psub.pas

@@ -784,6 +784,8 @@ implementation
             }
             if ((po_assembler in procdef.procoptions) and
                 (m_delphi in current_settings.modeswitches) and
+                { localst at main_program_level is a staticsymtable }
+                (procdef.localst.symtablelevel<>main_program_level) and
                 (tabstractlocalsymtable(procdef.localst).count_locals = 0)) or
                ((cs_opt_stackframe in current_settings.optimizerswitches) and
                 not(cs_generate_stackframes in current_settings.localswitches) and