diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-06-01 07:58:33 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-06-01 07:58:33 +0200 |
commit | fa9accdf75b7e41179f9dc60ce44ab7db4349985 (patch) | |
tree | e72c6e2a8c3a0fbeca35f4336b9cdaf96ad67c05 /src | |
parent | d6d94cd960f0d28b49e84eca2a3f5451a5d0a4af (diff) | |
download | ghdl-fa9accdf75b7e41179f9dc60ce44ab7db4349985.tar.gz ghdl-fa9accdf75b7e41179f9dc60ce44ab7db4349985.tar.bz2 ghdl-fa9accdf75b7e41179f9dc60ce44ab7db4349985.zip |
vhdl-utils(is_copyback_parameter): avoid a crash on file parameter
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-utils.adb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb index 8123e27f6..2d36c07ad 100644 --- a/src/vhdl/vhdl-utils.adb +++ b/src/vhdl/vhdl-utils.adb @@ -678,12 +678,8 @@ package body Vhdl.Utils is function Is_Copyback_Parameter (Inter : Iir) return Boolean is begin - case Iir_Parameter_Modes (Get_Mode (Inter)) is - when Iir_In_Mode => - return False; - when Iir_Out_Mode | Iir_Inout_Mode => - return Get_Kind (Inter) = Iir_Kind_Interface_Variable_Declaration; - end case; + return Get_Kind (Inter) = Iir_Kind_Interface_Variable_Declaration + and then Get_Mode (Inter) in Iir_Out_Mode .. Iir_Inout_Mode; end Is_Copyback_Parameter; function Find_Name_In_Flist (List : Iir_Flist; Lit : Name_Id) return Iir |