This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Wed, 2005-04-27 at 16:19 +0200, Richard Guenther wrote:
> fold_indirect_ref, called from the gimplifier happily converts
>
> const char *a;
>
> ...
>
> *(char *)&a[x] = 0;
>
> to
>
> a[x] = 0;
>
> confusing alias1 and ICEing in verify_ssa:
>
> /net/alwazn/home/rguenth/src/gcc/cvs/gcc-4.1/gcc/testsuite/gcc.c-torture/execute/20031215-1.c:11:
> error: Statement makes a memory store, but has no V_MAY_DEFS nor
> V_MUST_DEFS
> # VUSE <ao_1>;
> ao.ch[D.1242_5] = 0;
> /net/alwazn/home/rguenth/src/gcc/cvs/gcc-4.1/gcc/testsuite/gcc.c-torture/execute/20031215-1.c:11:
> internal compiler error: verify_ssa failed.
>
> happens only for patched gcc where C frontend and fold happen to
> produce .02.original:
>
> ;; Function test1 (test1)
> ;; enabled by -tree-original
>
>
> {
> if (ao.ch[ao.l] != 0)
> {
> *(char *) &ao.ch[(unsigned int) ao.l] = 0;
> }
> }
>
> then, generic is already wrong:
>
> test1 ()
> {
> int D.1240;
> char D.1241;
> unsigned int D.1242;
>
> D.1240 = ao.l;
> D.1241 = ao.ch[D.1240];
> if (D.1241 != 0)
> {
> D.1240 = ao.l;
> D.1242 = (unsigned int) D.1240;
> ao.ch[D.1242] = 0;
> }
>
> (note the missing cast).
>
>
> something like the following patch fixes this.
Right. Given that I'd seen similar problems with some unrelated
changes of mine, I went ahead and put your patch through the usual
bootstrap and regression tests on my i686 box.
Installed.
Attachment:
PPP
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |