From 317b196ae4552f23e31accd6e10a11e2903f9b31 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 23 Dec 2018 21:00:42 +0100 Subject: parse/sem: be more tolerant of parse errors. --- src/ghdldrv/ghdlcomp.adb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ghdldrv') diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index 0a1b7bac1..1a6aea6d6 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -449,7 +449,12 @@ package body Ghdlcomp is raise Compilation_Error; end if; - Free_Iir (Design_File); + if New_Design_File = Design_File then + pragma Assert (Flags.Flag_Force_Analysis); + null; + else + Free_Iir (Design_File); + end if; -- Do late analysis checks. if New_Design_File /= Null_Iir then -- cgit v1.2.3