This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32230] [4.3 Regression] Segfault in set_bb_for_stmt with -O -ftree-vectorize
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2007 12:20:12 -0000
- Subject: [Bug tree-optimization/32230] [4.3 Regression] Segfault in set_bb_for_stmt with -O -ftree-vectorize
- References: <bug-32230-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from rguenther at suse dot de 2007-06-28 12:20 -------
Subject: Re: [4.3 Regression] Segfault in
set_bb_for_stmt with -O -ftree-vectorize
On Thu, 28 Jun 2007, irar at il dot ibm dot com wrote:
>
>
> ------- Comment #6 from irar at il dot ibm dot com 2007-06-28 11:41 -------
> ((float*) (&((sbuf_header_t *) ((buf) == &(buf)->buf[0]))->buf[0]))[i] = val;
>
> is (after ommiting the casts)
>
> *(1B + (i * 4)) = val;
>
> Is that legal?
"Legal" as far as that you are not allowed to reject it at compile-time.
Of course runtime behavior looks completely undefined ;)
> Vectorizer assumes that every data-ref has base_address. In the above case we
> get the following data-ref structure:
> base_address: 0B
> offset from base address: 0
> constant offset from base address: 1
> step: 4
> aligned to: 128
> base_object: *0B
> symbol tag: SMT.5
>
> therefore, creating an empty stmt for the first access of the data-ref in the
> loop.
>
> Before Zdenek's rewrite of data-refs analysis, it failed to create a dr here,
> and thus no segfault occurred.
I suppose rejecting NULL bases should work here?
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32230