* stor-layout.c (bit_from_pos): Do not distribute the conversion.
From-SVN: r253074
This commit is contained in:
parent
65d8c94d37
commit
f17aba3c82
5 changed files with 44 additions and 11 deletions
|
@ -1,8 +1,6 @@
|
|||
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>
|
||||
|
||||
|
|
|
@ -853,14 +853,10 @@ start_record_layout (tree t)
|
|||
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
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
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.
|
||||
|
|
9
gcc/testsuite/gnat.dg/discr48.adb
Normal file
9
gcc/testsuite/gnat.dg/discr48.adb
Normal file
|
@ -0,0 +1,9 @@
|
|||
-- { 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;
|
19
gcc/testsuite/gnat.dg/discr48_pkg.ads
Normal file
19
gcc/testsuite/gnat.dg/discr48_pkg.ads
Normal file
|
@ -0,0 +1,19 @@
|
|||
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;
|
Loading…
Add table
Reference in a new issue