From fc966517eff655b9bc8f854e3f3e077d8e9df9f6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 21 Oct 2016 20:53:00 +0200 Subject: Fix a crash for a simple 'unaffected'. --- src/vhdl/parse.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb index 7d4598a4a..fc9dae4db 100644 --- a/src/vhdl/parse.adb +++ b/src/vhdl/parse.adb @@ -5542,7 +5542,10 @@ package body Parse is Parse_Options (Res); Wf := Parse_Conditional_Waveforms; - if Get_Kind (Wf) = Iir_Kind_Conditional_Waveform then + -- WF can be Null_Iir if the waveform is simply 'unaffected'. + if Wf /= Null_Iir + and then Get_Kind (Wf) = Iir_Kind_Conditional_Waveform + then N_Res := Create_Iir (Iir_Kind_Concurrent_Conditional_Signal_Assignment); if Get_Guard (Res) /= Null_Iir then -- cgit v1.2.3