[PATCH] Fix PR57980

Jakub Jelinek jakub@redhat.com
Tue Aug 13 10:27:00 GMT 2013


On Tue, Aug 13, 2013 at 12:24:59PM +0200, Jakub Jelinek wrote:
> On Mon, Aug 12, 2013 at 10:56:44AM +0200, Marek Polacek wrote:
> > On Fri, Aug 09, 2013 at 08:40:00PM +0200, Richard Biener wrote:
> > > Marek Polacek <polacek@redhat.com> wrote:
> > > >In this PR the problem was that when dealing with the gimple assign in
> > > >the tailcall optimization, we, when the rhs operand is of a vector
> > > >type, need to create -1 also of a vector type, but build_int_cst
> > > >doesn't create vectors (ICEs).  Instead, we should use
> > > >build_minus_one_cst
> > > >because that can create even the VECTOR_TYPE constant (and, it can
> > > >create even REAL_TYPE/COMPLEX_TYPE), as suggested by Marc.
> > > >
> > > >Regtested/bootstrapped on x86_64-linux, ok for trunk and 4.8?
> > > 
> > > Ok. Double-check that this function exists on the branch please.
> > 
> > It does not :(.  So not backporting to 4.8...
> 
> For 4.8/4.7, I'd say just change those
>   else
>     *m = build_int_cst (TREE_TYPE (...), -1);
> into
>   else if (INTEGRAL_TYPE_P (TREE_TYPE (...)))
>     *m = build_int_cst (TREE_TYPE (...), -1);
>   else
>     return false;

Also, for the testcase,
typedef int V __attribute__ ((vector_size (sizeof (int))));
looks weird, that is one element vector, can you use 2 * sizeof (int)
instead and add -w to dg-options (for the various -Wpsabi warnings)?

	Jakub



More information about the Gcc-patches mailing list