Commit 9ee309d4 by Olivier Hainque Committed by Olivier Hainque

trans.c (gnat_to_gnu): In range check processing...

	ada/
	* gcc-interface/trans.c (gnat_to_gnu) <case N_Slice>: In range
	check processing, remove unintended TREE_TYPE walk on index type
	to get to base type.

	testsuite/
	* gnat.dg/slice_enum.adb: New test.

From-SVN: r144774
parent 07c97076
2009-03-11 Olivier Hainque <hainque@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu) <case N_Slice>: In range
checks processing, remove unintended TREE_TYPE walk on index type.
2009-03-11 Jason Merrill <jason@redhat.com>
PR debug/39086
......
......@@ -3594,7 +3594,7 @@ gnat_to_gnu (Node_Id gnat_node)
gnu_max_expr = protect_multiple_eval (gnu_max_expr);
/* Derive a good type to convert everything to. */
gnu_expr_type = get_base_type (TREE_TYPE (gnu_index_type));
gnu_expr_type = get_base_type (gnu_index_type);
/* Test whether the minimum slice value is too small. */
gnu_expr_l = build_binary_op (LT_EXPR, integer_type_node,
......
2009-03-11 Olivier Hainque <hainque@adacore.com>
* gnat.dg/slice_enum.adb: New test.
2009-03-11 Jason Merrill <jason@redhat.com>
PR debug/39086
......
-- { dg-do compile }
procedure Slice_Enum is
Pos : array (Boolean) of Integer;
begin
Pos (Boolean) := (others => 0);
end;
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