Commit 67f925ad authored by hugues.jerome's avatar hugues.jerome

* Allow mixing integer and float types


git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@788 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 2339064f
......@@ -2422,7 +2422,17 @@ package body Ocarina.Backends.REAL is
if Is_Int then
Cpt := Cpt + Integer (Get_Value_Type (V).IVal);
else
Real_Cpt := Real_Cpt + Float (Get_Value_Type (V).RVal);
if Get_Value_Type (V).T = LT_Real then
Real_Cpt := Real_Cpt + Float (Get_Value_Type (V).RVal);
elsif Get_Value_Type (V).T = LT_Integer then
Real_Cpt := Real_Cpt + Float (Get_Value_Type (V).IVal);
else
Display_Located_Error
(Loc (First_Node (Parameters (E))),
"Incompatible types" & Get_Value_Type (V).T'Img,
Fatal => True);
end if;
end if;
N := Next_Node (N);
......@@ -2738,7 +2748,6 @@ package body Ocarina.Backends.REAL is
(Loc (E), "Unknown or not implemented verification function",
Fatal => True);
end case;
end Compute_Check_Subprogram_Call;
--------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment