--- /dev/null
+-- { dg-do compile }
+
+package Array6 is
+
+ type Range_Type is range -10 .. 10;
+ type Array_Type is array (Range_Type range <> ) of Short_Short_Integer;
+
+ type Record_Type is record
+ A : Array_Type(-2..4);
+ end record ;
+
+ Rec : Record_Type := (A => (others => -1));
+
+end Array6;
/* Relative index of this element if this is an array component. */
HOST_WIDE_INT relative_index
- = (!local->field
- ? (local->index
- ? (tree_to_shwi (local->index)
- - tree_to_shwi (local->min_index))
- : local->last_relative_index + 1)
- : 0);
+ = (local->field
+ ? 0
+ : (local->index
+ ? tree_to_uhwi (local->index) - tree_to_uhwi (local->min_index)
+ : local->last_relative_index + 1));
/* Bit position of this element from the start of the containing
constructor. */
HOST_WIDE_INT constructor_relative_ebitpos
- = (local->field
- ? int_bit_position (local->field)
- : ebitsize * relative_index);
+ = (local->field
+ ? int_bit_position (local->field)
+ : ebitsize * relative_index);
/* Bit position of this element from the start of a possibly ongoing
outer byte buffer. */