[C/C++ PATCH] Fix ICEs with vector subscripting of register variables (PR middle-end/80162)

Marek Polacek polacek@redhat.com
Mon Mar 27 17:06:00 GMT 2017


On Mon, Mar 27, 2017 at 12:06:03PM -0400, Jason Merrill wrote:
> On Fri, Mar 24, 2017 at 2:55 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > c*_mark_addressable doesn't look through VIEW_CONVERT_EXPRs that
> > vector subscripts are turned into, which means we don't diagnose
> > taking address of e.g. a vector element in a hard register.
> >
> > On the other side, I think we want to support just normal vector
> > subscripting of vectors in hard registers, that can be expanded
> > into e.g. vector shift etc.
> >
> > So, this patch handles specially c*_mark_addressable calls from
> > array_ref building, otherwise diagnoses taking addresses of
> > vector elements in hard registers.
> >
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> OK if C doesn't object.

I'm fine with the C parts but I think you should use VECTOR_TYPE_P
(two spots).

	Marek



More information about the Gcc-patches mailing list