This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21734] [4.1 regression] ICE: -ftree-vectorize, segfault
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 May 2005 05:55:27 -0000
- Subject: [Bug tree-optimization/21734] [4.1 regression] ICE: -ftree-vectorize, segfault
- References: <20050524080015.21734.stefaandr@hotmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From law at redhat dot com 2005-05-25 05:55 -------
Subject: Re: [4.1 regression] ICE:
-ftree-vectorize, segfault
On Tue, 2005-05-24 at 14:21 +0000, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-24 14:21 -------
> Here is a C testcase:
> struct a
> {
> int aa[4];
> };
> struct b
> {
> struct a aa;
> };
>
> void foo(struct b *bb)
> {
> int i;
> for (i=0; i<4; ++i)
> {
> struct a *aa = &bb->aa;
> struct a *aa1 = aa;
> struct a *aa2 = aa1;
> int *d = &aa2->aa[i];
> *d = 0;
> }
> }
>
> I think this is caused by the forwprop changes. (Notice the extra variables to reproduce this bug).
Actually, this is a bug in the vectorizer code to update PHIs in duplicate
loops. forwprop AFAICT is just exposing the latent vectorizer bug.
>From what I've been able to determine so far, the vectorizer code to
update PHIs doesn't properly handle the case where a PHI is dead. It
is likely someone with more experience in the vectorizer code is going
to need to fix this.
Jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21734