aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-08-03 06:56:57 +0200
committerTristan Gingold <tgingold@free.fr>2022-08-03 06:56:57 +0200
commit7edca40761c6f87878367d53037a5a0dea2117ef (patch)
treee132e754bef8eae264212efe7c8903aacde6cf95
parent4489329672d1e3b48a9784cd60bced769204ddc4 (diff)
downloadghdl-7edca40761c6f87878367d53037a5a0dea2117ef.tar.gz
ghdl-7edca40761c6f87878367d53037a5a0dea2117ef.tar.bz2
ghdl-7edca40761c6f87878367d53037a5a0dea2117ef.zip
psl-build.adb: disable incorrect optimization. Fix #2157
-rw-r--r--src/psl/psl-build.adb5
-rw-r--r--src/psl/psl-build.ads2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/psl/psl-build.adb b/src/psl/psl-build.adb
index 451466608..c9ae68d80 100644
--- a/src/psl/psl-build.adb
+++ b/src/psl/psl-build.adb
@@ -308,7 +308,10 @@ package body PSL.Build is
Eps := Get_Epsilon_NFA (L) or Get_Epsilon_NFA (R);
-- Optimize [*0] | R.
- if Start_L = Final_L
+ -- TODO: this was not valid if there is an edge from Start(R)
+ -- to Start(R), like: {[*0] | {d[*]; e}}
+ if False
+ and then Start_L = Final_L
and then Get_First_Src_Edge (Start_L) = No_Edge
then
if Start_R /= Final_R then
diff --git a/src/psl/psl-build.ads b/src/psl/psl-build.ads
index 9a2d05073..cf5053116 100644
--- a/src/psl/psl-build.ads
+++ b/src/psl/psl-build.ads
@@ -17,7 +17,7 @@
with PSL.Nodes; use PSL.Nodes;
package PSL.Build is
- Optimize_Final : Boolean := True;
+ Optimize_Final : constant Boolean := True;
function Build_SERE_FA (N : Node) return NFA;
function Build_FA (N : Node) return NFA;