Commit 0461b801 by Eric Botcazou Committed by Eric Botcazou

gimplify.c (gimplify_init_ctor_preeval): Call maybe_with_size_expr on the…

gimplify.c (gimplify_init_ctor_preeval): Call maybe_with_size_expr on the element before gimplifying it...

	* gimplify.c (gimplify_init_ctor_preeval): Call maybe_with_size_expr
	on the element before gimplifying it, instead of punting if it is of
	variable size.

From-SVN: r117288
parent 8072ddb0
2006-09-28 Eric Botcazou <ebotcazou@adacore.com>
* gimplify.c (gimplify_init_ctor_preeval): Call maybe_with_size_expr
on the element before gimplifying it, instead of punting if it is of
variable size.
2006-09-28 Zdenek Dvorak <dvorakz@suse.cz>
* doc/loop.texi: New file.
......
......@@ -2670,9 +2670,8 @@ gimplify_init_ctor_preeval (tree *expr_p, tree *pre_p, tree *post_p,
return;
}
/* We can't preevaluate if the type contains a placeholder. */
if (type_contains_placeholder_p (TREE_TYPE (*expr_p)))
return;
/* If this is a variable sized type, we must remember the size. */
maybe_with_size_expr (expr_p);
/* Gimplify the constructor element to something appropriate for the rhs
of a MODIFY_EXPR. Given that we know the lhs is an aggregate, we know
......
2006-09-28 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/self_aggregate_with_pointer.adb: New test.
2006-09-27 Steven G. Kargl <kargls@gcc.gnu.org>
PR fortran/28276
-- { dg-do run }
procedure self_aggregate_with_pointer is
type Arr is array (Natural range <>) of Integer;
type Rec (N : Natural) is record
A : Arr (1..N);
end record;
type Acc_Rec is access all Rec;
type SRec is record
A : Acc_Rec;
I1, I2, I3, I4, I5, I6, I7: Integer;
end record;
R : aliased Rec (1);
S : Srec := (A => R'Access, others => 0);
begin
S := (A => S.A, others => 0);
if S.A /= R'Access then
raise Program_Error;
end if;
end;
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