+2008-11-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * tree-sra.c (bitfield_overlaps_p): Fix oversight.
+
2008-11-03 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR other/37463
+2008-11-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/array5.adb New test.
+
2008-11-03 Richard Guenther <rguenther@suse.de>
Jakub Jelinek <jakub@redhat.com>
--- /dev/null
+-- { dg-do run }
+-- { dg-options "-O" }
+
+procedure Array5 is
+
+ type myint is range 0 .. 100_000;
+ Bla : constant myint := 359;
+
+ type my_array is array (1 .. 2) of myint;
+
+ type item is record
+ Length : Integer;
+ Content : my_array;
+ end record;
+
+ procedure create_item (M : out item) is
+ begin
+ M.Length := 1;
+ M.Content := (others => Bla);
+ end;
+
+ Var : item;
+
+begin
+ create_item (Var);
+
+ if Var.Length = 1
+ and then Var.Content (1) = Bla
+ then
+ null;
+ else
+ raise Program_Error;
+ end if;
+end;
}
else if (TREE_CODE (fld->element) == INTEGER_CST)
{
+ tree domain_type = TYPE_DOMAIN (TREE_TYPE (fld->parent->element));
flen = fold_convert (bitsizetype, TYPE_SIZE (fld->type));
fpos = fold_convert (bitsizetype, fld->element);
+ if (domain_type && TYPE_MIN_VALUE (domain_type))
+ fpos = size_binop (MINUS_EXPR, fpos,
+ fold_convert (bitsizetype,
+ TYPE_MIN_VALUE (domain_type)));
fpos = size_binop (MULT_EXPR, flen, fpos);
}
else