From 511186f0a42727b8439ca8e986de8063e6342f9d Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 8 Aug 2017 15:37:29 +0400 Subject: [PATCH] applied temple's fix for the ofront issue #30, endless recoursion for cyclic array types. https://github.com/jtempl/ofront/commit/c7d37c9162ce48d7feb4fbe2d6d2bc238d06a57d --- src/compiler/OPC.Mod | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/OPC.Mod b/src/compiler/OPC.Mod index 376ba412..43b86251 100644 --- a/src/compiler/OPC.Mod +++ b/src/compiler/OPC.Mod @@ -453,6 +453,9 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) ELSIF str^.form = OPT.Pointer THEN IF str^.BaseTyp^.comp # OPT.Record THEN DefineType(str^.BaseTyp) END ELSIF str^.comp IN {OPT.Array, OPT.DynArr} THEN + IF (str^.BaseTyp^.strobj # NIL) & (str^.BaseTyp^.strobj^.linkadr = ProcessingType) THEN (*cyclic base type*) + OPM.Mark(244, str^ .txtpos); str^.BaseTyp^.strobj^.linkadr := PredefinedType + END ; DefineType(str^.BaseTyp) ELSIF str^.form = OPT.ProcTyp THEN IF str^.BaseTyp # OPT.notyp THEN DefineType(str^.BaseTyp) END ;