This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ICE with non-lvalue vector subscripts and make sure non-lvalue vector subscripts aren't used as lvalues (PR target/63764)


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]