[PATCH] Fix PR31150
Richard Guenther
richard.guenther@gmail.com
Thu Jun 28 09:43:00 GMT 2007
On 6/28/07, Revital1 Eres <ERES@il.ibm.com> wrote:
>
> Hello,
>
> This patch deals with initializing nonzero elements of sparse array with
> their constant value.
>
> If we have -
>
> char str[2][34] = {"a","b"};
>
> We will generate:
>
> str = {};
> str[0][0] = 97;
> str[1][0] = 98;
>
> Instead of: (as is currently done)
>
> str = {};
> str[0] = "a";
> str[1] = "b";
>
> Bootstrapped and tested on ppc64 and x86_64.
>
> :ADDPATCH middle-end (gimple):
>
> Thanks to Andrew Pinski for his help.
>
> OK for mainline?
Any particular reason why you restrict this to character types?
Thanks,
Richard.
> Thanks,
> Revital
>
>
> 2007-06-27 Revital Eres <eres@il.ibm.com>
>
> PR middle-end/31150
> * gimplify.c (gimplify_init_ctor_eval): Initialize the scalar
> elements of an array.
>
> * testsuite/gcc.dg/pr31150.c: New test.
>
> (See attached file: pr31150.txt)(See attached file: patch_31150.txt)
>
>
>
>
More information about the Gcc-patches
mailing list