trans.c (Call_to_gnu): Remove guard for NULL_EXPR.
* gcc-interface/trans.c (Call_to_gnu): Remove guard for NULL_EXPR. * gcc-interface/utils2.c (gnat_rewrite_reference) <ERROR_MARK>: Return the reference unmodified. <NULL_EXPR>: New case. Likewise. From-SVN: r231513
This commit is contained in:
parent
6b4f890601
commit
d747d0057c
|
@ -1,3 +1,10 @@
|
|||
2015-12-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc-interface/trans.c (Call_to_gnu): Remove guard for NULL_EXPR.
|
||||
* gcc-interface/utils2.c (gnat_rewrite_reference) <ERROR_MARK>: Return
|
||||
the reference unmodified.
|
||||
<NULL_EXPR>: New case. Likewise.
|
||||
|
||||
2015-12-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc-interface/gigi.h (create_var_decl): Adjust comment.
|
||||
|
|
|
@ -4407,9 +4407,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
|
|||
/* If it's possible we may need to use this expression twice, make sure
|
||||
that any side-effects are handled via SAVE_EXPRs; likewise if we need
|
||||
to force side-effects before the call. */
|
||||
if (Ekind (gnat_formal) != E_In_Parameter
|
||||
&& !is_by_ref_formal_parm
|
||||
&& TREE_CODE (gnu_name) != NULL_EXPR)
|
||||
if (Ekind (gnat_formal) != E_In_Parameter && !is_by_ref_formal_parm)
|
||||
{
|
||||
tree init = NULL_TREE;
|
||||
gnu_name = gnat_stabilize_reference (gnu_name, true, &init);
|
||||
|
|
|
@ -2733,7 +2733,8 @@ gnat_rewrite_reference (tree ref, rewrite_fn func, void *data, tree *init)
|
|||
break;
|
||||
|
||||
case ERROR_MARK:
|
||||
return error_mark_node;
|
||||
case NULL_EXPR:
|
||||
return ref;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-12-10 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/array25.adb: New test.
|
||||
* gnat.dg/array25_pkg.ad[sb]: New helper.
|
||||
|
||||
2015-12-10 Claudiu Zissulescu <claziss@synopsys.com>
|
||||
|
||||
* lib/target-supports.exp (check_effective_target_arc_atomic): New
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
-- { dg-do compile }
|
||||
|
||||
with Array25_Pkg;
|
||||
|
||||
procedure Array25 is
|
||||
|
||||
package My_Pkg is new Array25_Pkg (0, 0);
|
||||
|
||||
begin
|
||||
null;
|
||||
end;
|
|
@ -0,0 +1,15 @@
|
|||
package body Array25_Pkg is
|
||||
|
||||
procedure Get_Inner (A : out Arr1) is
|
||||
begin
|
||||
null;
|
||||
end;
|
||||
|
||||
procedure Get (A : out Arr2) is
|
||||
begin
|
||||
for I in Arr2'Range loop
|
||||
Get_Inner (A (I).Data);
|
||||
end loop;
|
||||
end;
|
||||
|
||||
end Array25_Pkg;
|
|
@ -0,0 +1,19 @@
|
|||
generic
|
||||
|
||||
UB1 : Natural;
|
||||
|
||||
UB2 : Natural;
|
||||
|
||||
package Array25_Pkg is
|
||||
|
||||
type Arr1 is array (1 .. UB1) of Integer;
|
||||
|
||||
type Rec is record
|
||||
Data : Arr1;
|
||||
end record;
|
||||
|
||||
type Arr2 is array (1 .. UB2) of Rec;
|
||||
|
||||
procedure Get (A : out Arr2);
|
||||
|
||||
end Array25_Pkg;
|
Loading…
Reference in New Issue