* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144774
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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
--- /dev/null
+-- { dg-do compile }
+
+procedure Slice_Enum is
+ Pos : array (Boolean) of Integer;
+begin
+ Pos (Boolean) := (others => 0);
+end;
+