Commit 8c963290 by Richard Biener

tree-vect-data-refs.c (vect_check_gather_scatter): Fail for reverse storage…

tree-vect-data-refs.c (vect_check_gather_scatter): Fail for reverse storage order accesses rather than asserting they cannot...

2018-06-25  Richard Biener  <rguenther@suse.de>
        Eric Botcazou  <ebotcazou@libertysurf.fr>

	* tree-vect-data-refs.c (vect_check_gather_scatter): Fail
	for reverse storage order accesses rather than asserting
	they cannot happen here.

	* gnat.dg/sso9.adb: New testcase.
	* gnat.dg/sso9_pkg.ads: Likewise.

From-SVN: r262007
parent fd082a66
2018-06-25 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_check_gather_scatter): Fail
for reverse storage order accesses rather than asserting
they cannot happen here.
2018-06-25 Tom de Vries <tdevries@suse.de> 2018-06-25 Tom de Vries <tdevries@suse.de>
PR debug/86257 PR debug/86257
......
2018-06-25 Eric Botcazou <ebotcazou@libertysurf.fr>
* gnat.dg/sso9.adb: New testcase.
* gnat.dg/sso9_pkg.ads: Likewise.
2018-06-25 Tom de Vries <tdevries@suse.de> 2018-06-25 Tom de Vries <tdevries@suse.de>
PR debug/86257 PR debug/86257
......
-- { dg-do compile }
-- { dg-options "-O3 -gnatws" }
with SSO9_Pkg; use SSO9_Pkg;
procedure SSO9 is
A : Arr;
begin
Proc (A);
end;
with System;
package SSO9_Pkg is
type Rec (D : Boolean := False) is record
B : Boolean;
end record;
for Rec'Bit_Order use System.High_Order_First;
for Rec'Scalar_Storage_Order use System.High_Order_First;
type Arr is array (1 .. 16) of Rec;
procedure Proc (A : Arr);
end SSO9_Pkg;
...@@ -3730,7 +3730,9 @@ vect_check_gather_scatter (gimple *stmt, loop_vec_info loop_vinfo, ...@@ -3730,7 +3730,9 @@ vect_check_gather_scatter (gimple *stmt, loop_vec_info loop_vinfo,
that can be gimplified before the loop. */ that can be gimplified before the loop. */
base = get_inner_reference (base, &pbitsize, &pbitpos, &off, &pmode, base = get_inner_reference (base, &pbitsize, &pbitpos, &off, &pmode,
&punsignedp, &reversep, &pvolatilep); &punsignedp, &reversep, &pvolatilep);
gcc_assert (base && !reversep); if (reversep)
return false;
poly_int64 pbytepos = exact_div (pbitpos, BITS_PER_UNIT); poly_int64 pbytepos = exact_div (pbitpos, BITS_PER_UNIT);
if (TREE_CODE (base) == MEM_REF) if (TREE_CODE (base) == MEM_REF)
......
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