diff options
author | Tristan Gingold | 2015-09-04 21:52:38 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-09-04 21:52:38 +0200 |
commit | 8520993b4d1eadefa488dfc96dff25333f1b19db (patch) | |
tree | 818d4fe917d3e6b765932ed3d1ab1ee70dc3c508 /src/vhdl/sem_stmts.adb | |
parent | 2d8f611cb63b72aa0373efe0ffa0df47e25519c9 (diff) | |
download | ghdl-8520993b4d1eadefa488dfc96dff25333f1b19db.tar.gz ghdl-8520993b4d1eadefa488dfc96dff25333f1b19db.tar.bz2 ghdl-8520993b4d1eadefa488dfc96dff25333f1b19db.zip |
Suppress stack switching; save process state in secondary stack.
Diffstat (limited to 'src/vhdl/sem_stmts.adb')
-rw-r--r-- | src/vhdl/sem_stmts.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vhdl/sem_stmts.adb b/src/vhdl/sem_stmts.adb index a1d3275..4541be4 100644 --- a/src/vhdl/sem_stmts.adb +++ b/src/vhdl/sem_stmts.adb @@ -1246,11 +1246,16 @@ package body Sem_Stmts is begin Sem_Procedure_Call (Call, Stmt); - -- Set suspend flag. + -- Set suspend flag, if calling a suspendable procedure + -- from a procedure or from a process. Imp := Get_Implementation (Call); if Imp /= Null_Iir and then Get_Kind (Imp) = Iir_Kind_Procedure_Declaration and then Get_Suspend_Flag (Imp) + and then (Get_Kind (Get_Current_Subprogram) + /= Iir_Kind_Function_Declaration) + and then (Get_Kind (Get_Current_Subprogram) + /= Iir_Kind_Sensitized_Process_Statement) then Set_Suspend_Flag (Stmt, True); Mark_Suspendable (Stmt); |