gimplify.c (gimplify_modify_expr_rhs): Gimplify the LHS using the is_gimple_lvalue predicate instead of is_gimple_min_lval.

* gimplify.c (gimplify_modify_expr_rhs) <COND_EXPR>: Gimplify the LHS
	using the is_gimple_lvalue predicate instead of is_gimple_min_lval.

From-SVN: r134442
This commit is contained in:
Eric Botcazou 2008-04-18 18:18:53 +00:00 committed by Eric Botcazou
parent 893174face
commit ed3444e901
8 changed files with 87 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
* gimplify.c (gimplify_modify_expr_rhs) <COND_EXPR>: Gimplify the LHS
using the is_gimple_lvalue predicate instead of is_gimple_min_lval.
2008-04-18 Tom Tromey <tromey@redhat.com>
PR libcpp/15500:

View File

@ -3636,7 +3636,7 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p,
tree result = *to_p;
ret = gimplify_expr (&result, pre_p, post_p,
is_gimple_min_lval, fb_lvalue);
is_gimple_lvalue, fb_lvalue);
if (ret != GS_ERROR)
ret = GS_OK;

View File

@ -1,3 +1,9 @@
2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/dynamic_elab_pkg.ads: New helper.
* gnat.dg/dynamic_elab1.ad[sb]: New test.
* gnat.dg/dynamic_elab2.ad[sb]: Likewise.
2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
Tests for char16_t and char32_t support.

View File

@ -0,0 +1,20 @@
-- { dg-do compile }
-- { dg-options "-gnatE" }
package body Dynamic_Elab1 is
function Get_Plot return Plot is
procedure Fill (X : out Plot) is
begin
X.Data := Get_R;
end;
X : Plot;
begin
Fill(X);
return X;
end;
end Dynamic_Elab1;

View File

@ -0,0 +1,12 @@
with Dynamic_Elab_Pkg; use Dynamic_Elab_Pkg;
package Dynamic_Elab1 is
type Plot is record
Data : R;
end record;
pragma Pack (Plot);
function Get_Plot return Plot;
end Dynamic_Elab1;

View File

@ -0,0 +1,20 @@
-- { dg-do compile }
-- { dg-options "-gnatE" }
package body Dynamic_Elab2 is
function Get_Plot return Plot is
procedure Fill (X : out Plot) is
begin
X.Data := Get_R;
end;
X : Plot;
begin
Fill(X);
return X;
end;
end Dynamic_Elab2;

View File

@ -0,0 +1,13 @@
with Dynamic_Elab_Pkg; use Dynamic_Elab_Pkg;
package Dynamic_Elab2 is
type Plot is record
B : Boolean;
Data : R;
end record;
pragma Pack (Plot);
function Get_Plot return Plot;
end Dynamic_Elab2;

View File

@ -0,0 +1,10 @@
package Dynamic_Elab_Pkg is
type R is record
Code : Integer;
Val : Boolean;
end record;
function Get_R return R;
end Dynamic_Elab_Pkg;