aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_expr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/sem_expr.adb')
-rw-r--r--src/vhdl/sem_expr.adb48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb
index 084aa377f..20ff0da71 100644
--- a/src/vhdl/sem_expr.adb
+++ b/src/vhdl/sem_expr.adb
@@ -425,54 +425,6 @@ package body Sem_Expr is
end case;
end Check_Is_Expression;
- function Check_Implicit_Conversion (Targ_Type : Iir; Expr : Iir)
- return Boolean
- is
- Expr_Type : Iir;
- Targ_Indexes : Iir_List;
- Expr_Indexes : Iir_List;
- Targ_Index : Iir;
- Expr_Index : Iir;
- begin
- -- Handle errors.
- if Targ_Type = Null_Iir or else Expr = Null_Iir then
- return True;
- end if;
- if Get_Kind (Targ_Type) /= Iir_Kind_Array_Subtype_Definition
- or else Get_Constraint_State (Targ_Type) /= Fully_Constrained
- then
- return True;
- end if;
- Expr_Type := Get_Type (Expr);
- if Expr_Type = Null_Iir
- or else Get_Kind (Expr_Type) /= Iir_Kind_Array_Subtype_Definition
- or else Get_Constraint_State (Expr_Type) /= Fully_Constrained
- then
- return True;
- end if;
- Targ_Indexes := Get_Index_Subtype_List (Targ_Type);
- Expr_Indexes := Get_Index_Subtype_List (Expr_Type);
- for I in Natural loop
- Targ_Index := Get_Index_Type (Targ_Indexes, I);
- Expr_Index := Get_Index_Type (Expr_Indexes, I);
- exit when Targ_Index = Null_Iir and Expr_Index = Null_Iir;
- if Targ_Index = Null_Iir or Expr_Index = Null_Iir then
- -- Types does not match.
- raise Internal_Error;
- end if;
- if Get_Type_Staticness (Targ_Index) = Locally
- and then Get_Type_Staticness (Expr_Index) = Locally
- then
- if Eval_Discrete_Type_Length (Targ_Index)
- /= Eval_Discrete_Type_Length (Expr_Index)
- then
- return False;
- end if;
- end if;
- end loop;
- return True;
- end Check_Implicit_Conversion;
-
-- Find a type compatible with A_TYPE in TYPE_LIST (which can be an
-- overload list or a simple type) and return it.
-- In case of failure, return null.