Skip to content

Commit

Permalink
* Correct logic for By_Reference type
Browse files Browse the repository at this point in the history
    For #299
  • Loading branch information
yoogx committed Mar 23, 2022
1 parent c0c9e6c commit 9873d8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/backends/po_hi_c/ocarina-backends-po_hi_c-activity.adb
Expand Up @@ -1231,23 +1231,23 @@ package body Ocarina.Backends.PO_HI_C.Activity is
Is_Pointer => True);

if By_Reference_Type (D) then
Append_Node_To_List (N, Call_Parameters);
else
Append_Node_To_List (Make_Variable_Address (N),
Call_Parameters);
else
Append_Node_To_List (N, Call_Parameters);
end if;

N := Map_C_Data_Type_Designator (D);

if By_Reference_Type (D) then
N :=
Make_Parameter_Specification
(Map_C_Defining_Identifier (F), N);
(Map_C_Defining_Identifier (F),
CTU.Make_Pointer_Type (N));
else
N :=
Make_Parameter_Specification
(Map_C_Defining_Identifier (F),
CTU.Make_Pointer_Type (N));
(Map_C_Defining_Identifier (F), N);
end if;
Append_Node_To_List (N, Parameter_List);
end if;
Expand Down

0 comments on commit 9873d8b

Please sign in to comment.