This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICE with non-lvalue vector subscripts and make sure non-lvalue vector subscripts aren't used as lvalues (PR target/63764)
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Nov 2014 19:38:47 +0100
- Subject: Re: [PATCH] Fix ICE with non-lvalue vector subscripts and make sure non-lvalue vector subscripts aren't used as lvalues (PR target/63764)
- Authentication-results: sourceware.org; auth=none
- References: <20141120180949 dot GV1745 at tucnak dot redhat dot com>
On 11/20/2014 07:09 PM, Jakub Jelinek wrote:
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2014-11-20 Jakub Jelinek <jakub@redhat.com>
>
> PR target/63764
> c-family/
> * c-common.h (convert_vector_to_pointer_for_subscript): Change
> return type to bool.
> * c-common.c: Include gimple-expr.c.
> (convert_vector_to_pointer_for_subscript): Change return type to
> bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
> and copy it into a TARGET_EXPR and use that instead of *vecp
> directly.
> c/
> * c-typeck.c (build_array_ref): Adjust
> convert_vector_to_pointer_for_subscript caller. If it returns true,
> call non_lvalue_loc on the result.
> cp/
> * typeck.c (cp_build_array_ref): Adjust
> convert_vector_to_pointer_for_subscript caller. If it returns true,
> call non_lvalue_loc on the result.
> testsuite/
> * c-c++-common/pr63764-1.c: New test.
> * c-c++-common/pr63764-2.c: New test.
Ok.
r~