On Sat, May 04, 2013 at 10:34:52AM +0200, Eric Botcazou wrote:
> > I believe the real problem here is in place_block_symbol() and
> > output_object_block(). If DECL_INITIAL is given for an array, then
> > shouldn't we be taking the size from the initializer?
>
> This means that the size of the array and the size of the initializer don't
> agree, right? IMO this should be fixed instead since this could run afoul of
> various optimizations using array_ref_up_bound for example.
Good to hear. I wasn't sure whether the sizes were even supposed to
agree. Assuming Jakub's second patch fixes java for us (testing now),
that just leaves gcc.c-torture/execute/20010924-1.c which fails to
size a3 and a4 properly. Both of these vars have DECL_SIZE_UNIT of 1.
struct {
char a3c;
char a3p[];
} a3 = {
'o',
"wx"
};
struct {
char a4c;
char a4p[];
} a4 = {
'9',
{ 'e', 'b' }
};
--
Alan Modra
Australia Development Lab, IBM