Commit 6f71e355 by Eric Botcazou Committed by Eric Botcazou

trans.c (Raise_Error_to_gnu): Record the unpadded type of the index type on the RCI stack.

	* gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
	Record the unpadded type of the index type on the RCI stack.

From-SVN: r196504
parent b6ea6dbd
2013-06-03 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Raise_Error_to_gnu) <CE_Index_Check_Failed>:
Record the unpadded type of the index type on the RCI stack.
2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (emit_range_check): Assert that the range type
......
......@@ -4944,7 +4944,7 @@ Raise_Error_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p)
{
rci->low_bound = gnu_low_bound;
rci->high_bound = gnu_high_bound;
rci->type = gnat_to_gnu_type (gnat_type);
rci->type = get_unpadded_type (gnat_type);
rci->invariant_cond = build1 (SAVE_EXPR, boolean_type_node,
boolean_true_node);
gnu_cond = build_binary_op (TRUTH_ANDIF_EXPR,
......
2013-06-03 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/loop_optimization15.ad[sb]: New test.
2013-03-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56548
......
-- { dg-do compile }
-- { dg-options "-O3" }
package body Loop_Optimization15 is
type Integer_Array_T is array (B16_T range <>) of Integer;
Len : constant B16_T := 10;
Src : constant Integer_Array_T (1 .. Len) := (others => 0);
Dst : Integer_Array_T (1 .. Len);
procedure Proc (L : B16_T) is
begin
for I in 1 .. B16_T'Min (L, Len) loop
Dst (I) := Src (I);
end loop;
end;
end Loop_Optimization15;
package Loop_Optimization15 is
type B16_T is mod 2 ** 16;
for B16_T'Size use 16;
for B16_T'Alignment use 1;
procedure Proc (L : B16_T);
end Loop_Optimization15;
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