https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117262

--- Comment #7 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
tree.def has:

/* Used to represent the brace-enclosed initializers for a structure or an
   array.  It contains a sequence of component values made out of a VEC of
   constructor_elt.

   For RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE:
   The field INDEX of each constructor_elt is a FIELD_DECL.

   For ARRAY_TYPE:
   The field INDEX of each constructor_elt is the corresponding index.
   If the index is a RANGE_EXPR, it is a short-hand for many nodes,
   one for each index in the range.  (If the corresponding field VALUE
   has side-effects, they are evaluated once for each element.  Wrap the
   value in a SAVE_EXPR if you want to evaluate side effects only once.)

   Components that aren't present are cleared as per the C semantics,
   unless the CONSTRUCTOR_NO_CLEARING flag is set, in which case their
   value becomes undefined.  */
DEFTREECODE (CONSTRUCTOR, "constructor", tcc_exceptional, 0)

which suggests to me that if we're initializing more than one index, it should
be a RANGE_EXPR, not an INTEGER_CST.  Or would a RANGE_EXPR mean initialize
each element in the range with a copy of the value, and thus they would all get
the first element of the raw_data_cst?

Reply via email to