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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #4)
> where arguably the type of the symbolic value should be
>    unsigned char[72]
> rather than:
>    unsigned char
> 
> This is because the analyzer is just using TREE_TYPE of the cst, and
> TREE_TYPE of RAW_DATA_CST is the type of each of the elements, rather than
> of the data as a whole.  Is that design decision set in stone?

It is intentional, the RAW_DATA_CST doesn't really stand for a sub-array but a
set of elements, it is a special CONSTRUCTOR_ELTS element kind with different
properties.
And the scalar type has significant advantages both in the FEs and avoids
creating too much garbage when processing the initializers.  They are designed
so that it is cheap to break them appart e.g. when overriding something in the
middle of them, if we had to construct a new ARRAY_TYPE once or twice each time
we do that, that would create significant memory increase.

Reply via email to