r278957 - in /trunk/gcc: cp/ChangeLog cp/call.c...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Wed Dec 4 09:18:00 GMT 2019


Author: rsandifo
Date: Wed Dec  4 09:18:13 2019
New Revision: 278957

URL: https://gcc.gnu.org/viewcvs?rev=278957&root=gcc&view=rev
Log:
[C++] Opt out of GNU vector extensions for built-in SVE types

This is the C++ equivalent of r277950.  The changes are very similar
to there.  Perhaps the only noteworthy thing (that I know of) is that
the patch continues to treat !gnu_vector_type_p vector types as literal
types/potential constexprs.  Disabling the GNU vector extensions
shouldn't in itself stop the types from being literal types, since
whatever the target provides instead might be constexpr material.

2019-12-04  Richard Sandiford  <richard.sandiford@arm.com>

gcc/cp/
	* cp-tree.h (CP_AGGREGATE_TYPE_P): Check for gnu_vector_type_p
	instead of VECTOR_TYPE.
	* call.c (build_conditional_expr_1): Restrict vector handling
	to vectors that satisfy gnu_vector_type_p.
	* cvt.c (ocp_convert): Only allow vectors to be converted
	to bool if they satisfy gnu_vector_type_p.
	(build_expr_type_conversion): Only allow conversions from
	vectors if they satisfy gnu_vector_type_p.
	* typeck.c (cp_build_binary_op): Only allow binary operators to be
	applied to vectors if they satisfy gnu_vector_type_p.
	(cp_build_unary_op): Likewise unary operators.
	(build_reinterpret_cast_1):

gcc/testsuite/
	* g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C: New test.
	* g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C: New test.

Added:
    trunk/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C
    trunk/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/cvt.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list