A recent commit mistakenly changed the field name for tuples from 'val' to '__val', but unlike SVE this name is mandated by ACLE.
The patch simply switches back the name to 'val'. PR target/118332 gcc/ChangeLog: * config/arm/arm-mve-builtins.cc (wrap_type_in_struct): Use 'val' instead of '__val'. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/pr118332.c: New test. --- gcc/config/arm/arm-mve-builtins.cc | 5 ++--- gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c diff --git a/gcc/config/arm/arm-mve-builtins.cc b/gcc/config/arm/arm-mve-builtins.cc index 2a87c41b3ff..609fbc4cd59 100644 --- a/gcc/config/arm/arm-mve-builtins.cc +++ b/gcc/config/arm/arm-mve-builtins.cc @@ -450,13 +450,12 @@ register_vector_type (vector_type_index type) } /* Return a structure type that contains a single field of type FIELD_TYPE. - The field is called __val, but that's an internal detail rather than - an exposed part of the API. */ + The field is called 'val', as mandated by ACLE. */ static tree wrap_type_in_struct (tree field_type) { tree field = build_decl (input_location, FIELD_DECL, - get_identifier ("__val"), field_type); + get_identifier ("val"), field_type); tree struct_type = lang_hooks.types.make_type (RECORD_TYPE); DECL_FIELD_CONTEXT (field) = struct_type; TYPE_FIELDS (struct_type) = field; diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c new file mode 100644 index 00000000000..a8f6389c58d --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c @@ -0,0 +1,5 @@ +/* { dg-require-effective-target arm_v8_1m_mve_ok } */ +/* { dg-add-options arm_v8_1m_mve } */ + +#include <arm_mve.h> +uint32x4_t first(uint32x4x4_t a) { return a.val[0]; } -- 2.34.1