-2017-09-21 Tamar Christina <tamar.christina@arm.com>
+2017-09-21 Eric Botcazou <ebotcazou@adacore.com>
- PR testsuite/78421
- * lib/target-supports.exp (check_effective_target_vect_hw_misalign):
- Invert arm check.
+ * stor-layout.c (bit_from_pos): Do not distribute the conversion.
2017-09-21 Segher Boessenkool <segher@kernel.crashing.org>
tree
bit_from_pos (tree offset, tree bitpos)
{
- if (TREE_CODE (offset) == PLUS_EXPR)
- offset = size_binop (PLUS_EXPR,
- fold_convert (bitsizetype, TREE_OPERAND (offset, 0)),
- fold_convert (bitsizetype, TREE_OPERAND (offset, 1)));
- else
- offset = fold_convert (bitsizetype, offset);
return size_binop (PLUS_EXPR, bitpos,
- size_binop (MULT_EXPR, offset, bitsize_unit_node));
+ size_binop (MULT_EXPR,
+ fold_convert (bitsizetype, offset),
+ bitsize_unit_node));
}
/* Return the combined truncated byte position for the byte offset OFFSET and
+2017-09-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr48.adb: New test.
+ * gnat.dg/discr48_pkg.ads: New helper.
+
+2017-09-21 Tamar Christina <tamar.christina@arm.com>
+
+ PR testsuite/78421
+ * lib/target-supports.exp (check_effective_target_vect_hw_misalign):
+ Invert arm check.
+
2017-09-21 Cesar Philippidis <cesar@codesourcery.com>
* gfortran.dg/goacc/wait.f90: New test.
--- /dev/null
+-- { dg-do compile }
+
+with Discr48_Pkg; use Discr48_Pkg;
+
+function Discr48 return Rec_Access is
+ C : constant Rec := (Count => 1, Seps => (1 .. 0 => Null_XString));
+begin
+ return new Rec'(C);
+end;
--- /dev/null
+with Ada.Finalization;
+
+package Discr48_Pkg is
+
+ type XString is new Ada.Finalization.Controlled with record
+ B : Boolean;
+ end record;
+
+ Null_XString : constant XString := (Ada.Finalization.Controlled with B => False);
+
+ type XString_Array is array (Natural range <>) of XString;
+
+ type Rec (Count : Positive) is record
+ Seps : XString_Array (2 .. Count);
+ end record;
+
+ type Rec_Access is access all Rec;
+
+end Discr48_Pkg;