Commit 6ff0cdeb by Richard Sandiford Committed by Richard Sandiford

[AArch64] Fix build for non-default languages

The SVE PCS support broke go, D and Ada because those languages don't
call TARGET_INIT_BUILTINS.  We therefore ended up trying to get the
TYPE_MAIN_VARIANT of a null __SVBool_t.

We shouldn't really need to apply TYPE_MAIN_VARIANT there anyway,
since the ABI-defined types are (and need to be) their own main
variants.  This patch asserts for that instead.

2019-10-31  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/aarch64/aarch64-sve-builtins.cc (register_builtin_types):
	Assert that the type we store in abi_vector_types is its own
	main variant.
	(svbool_type_p): Don't apply TYPE_MAIN_VARIANT here.

From-SVN: r277680
parent aaa80941
2019-10-31 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64-sve-builtins.cc (register_builtin_types):
Assert that the type we store in abi_vector_types is its own
main variant.
(svbool_type_p): Don't apply TYPE_MAIN_VARIANT here.
2019-10-31 Richard Earnshaw <rearnsha@arm.com> 2019-10-31 Richard Earnshaw <rearnsha@arm.com>
* config/arm/arm.c (arm_legitimize_address): Don't form negative offsets * config/arm/arm.c (arm_legitimize_address): Don't form negative offsets
...@@ -2993,6 +2993,7 @@ register_builtin_types () ...@@ -2993,6 +2993,7 @@ register_builtin_types ()
BITS_PER_SVE_VECTOR)); BITS_PER_SVE_VECTOR));
} }
vectype = build_distinct_type_copy (vectype); vectype = build_distinct_type_copy (vectype);
gcc_assert (vectype == TYPE_MAIN_VARIANT (vectype));
SET_TYPE_STRUCTURAL_EQUALITY (vectype); SET_TYPE_STRUCTURAL_EQUALITY (vectype);
TYPE_ARTIFICIAL (vectype) = 1; TYPE_ARTIFICIAL (vectype) = 1;
abi_vector_types[i] = vectype; abi_vector_types[i] = vectype;
...@@ -3235,8 +3236,7 @@ bool ...@@ -3235,8 +3236,7 @@ bool
svbool_type_p (const_tree type) svbool_type_p (const_tree type)
{ {
tree abi_type = abi_vector_types[VECTOR_TYPE_svbool_t]; tree abi_type = abi_vector_types[VECTOR_TYPE_svbool_t];
return (type != error_mark_node return type != error_mark_node && TYPE_MAIN_VARIANT (type) == abi_type;
&& TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (abi_type));
} }
/* If TYPE is a built-in type defined by the SVE ABI, return the mangled name, /* If TYPE is a built-in type defined by the SVE ABI, return the mangled name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment