Commit a062c51e by Eric Botcazou Committed by Eric Botcazou

re PR tree-optimization/51580 (segfault during loop vectorization at -O3)

	PR tree-optimization/51580
	* gnat.dg/specs/loop_optimization1.ads: New test.
	* gnat.dg/specs/loop_optimization1_pkg.ad[sb]: New helper.

From-SVN: r182491
parent f7593cb4
2011-12-19 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/51580
* gnat.dg/specs/loop_optimization1.ads: New test.
* gnat.dg/specs/loop_optimization1_pkg.ad[sb]: New helper.
2011-12-19 Richard Guenther <rguenther@suse.de> 2011-12-19 Richard Guenther <rguenther@suse.de>
PR lto/51573 PR lto/51573
......
-- { dg-do compile }
-- { dg-options "-O3" }
with Loop_Optimization1_Pkg;
package Loop_Optimization1 is
type Kind_Type is (One, Two, Three, Four);
type Array_Type is array (Kind_Type) of Boolean;
pragma Pack (Array_Type);
package Q is new Loop_Optimization1_Pkg (Boolean, Kind_Type, Array_Type);
end Loop_Optimization1;
package body Loop_Optimization1_Pkg is
type Unconstrained_Array_Type
is array (Index_Type range <>) of Element_Type;
procedure Local (UA : in out Unconstrained_Array_Type) is
begin
null;
end;
procedure Proc (CA : in out Constrained_Array_Type) is
begin
Local (Unconstrained_Array_Type (CA));
end;
end Loop_Optimization1_Pkg;
-- { dg-excess-errors "no code generated" }
generic
type Element_Type is private;
type Index_Type is (<>);
type Constrained_Array_Type is array (Index_Type) of Element_Type;
package Loop_Optimization1_Pkg is
procedure Proc (CA : in out Constrained_Array_Type);
end Loop_Optimization1_Pkg;
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