die->type = range_type;
set_die_type (die, range_type, cu);
read_subrange_type (struct die_info *die, struct dwarf2_cu *cu){  struct type *base_type;  struct type *range_type;  struct attribute *attr;  int low = 0;  int high = -1;    /* If we have already decoded this die, then nothing more to do.  */  if (die->type)    return;  base_type = die_type (die, cu);  if (base_type == NULL)    {      complaint (&symfile_complaints,                "DW_AT_type missing from DW_TAG_subrange_type");      return;    }  if (TYPE_CODE (base_type) == TYPE_CODE_VOID)    base_type = alloc_type (NULL);  if (cu->language == language_fortran)    {       /* FORTRAN implies a lower bound of 1, if not given.  */      low = 1;    }  attr = dwarf2_attr (die, DW_AT_lower_bound, cu);  if (attr)    low = dwarf2_get_attr_constant_value (attr, 0);  attr = dwarf2_attr (die, DW_AT_upper_bound, cu);  if (attr)    {             if (attr->form == DW_FORM_block1)        {          /* GCC encodes arrays with unspecified or dynamic length             with a DW_FORM_block1 attribute.             FIXME: GDB does not yet know how to handle dynamic             arrays properly, treat them as arrays with unspecified             length for now.             FIXME: jimb/2003-09-22: GDB does not really know             how to handle arrays of unspecified length             either; we just represent them as zero-length             arrays.  Choose an appropriate upper bound given             the lower bound we've computed above.  */          high = low - 1;        }      else        high = dwarf2_get_attr_constant_value (attr, 1);    }  range_type = create_range_type (NULL, base_type, low, high);  attr = dwarf2_attr (die, DW_AT_name, cu);  if (attr && DW_STRING (attr))    TYPE_NAME (range_type) = DW_STRING (attr);    attr = dwarf2_attr (die, DW_AT_byte_size, cu);  if (attr)    TYPE_LENGTH (range_type) = DW_UNSND (attr);  die->type = range_type;}