From b96824c4848d33c8cc9b574ce29da98464feaabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Ferrer=20Ib=C3=A1=C3=B1ez?= Date: Tue, 26 Jan 2016 10:04:46 +0000 Subject: [PATCH] [PATCH] Do not set structural equality on polynomial types gcc/ChangeLog: PR target/67896 * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtin_types): Do not set structural equality to __Poly{8,16,64,128}_t types. gcc/testsuite/ChangeLog: PR target/67896 * gcc.target/aarch64/simd/pr67896.C: New. From-SVN: r232818 --- gcc/ChangeLog | 7 +++++++ gcc/config/aarch64/aarch64-builtins.c | 10 ++++++---- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/aarch64/simd/pr67896.C | 7 +++++++ 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/simd/pr67896.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a4e57bddbd..70e5fd61f3b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-01-26 Roger Ferrer Ibáñez + + PR target/67896 + * config/aarch64/aarch64-builtins.c + (aarch64_init_simd_builtin_types): Do not set structural + equality to __Poly{8,16,64,128}_t types. + 2016-01-26 Richard Sandiford PR tree-optimization/69400 diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index 925034b626c..5573903fe0a 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -614,14 +614,16 @@ aarch64_init_simd_builtin_types (void) enum machine_mode mode = aarch64_simd_types[i].mode; if (aarch64_simd_types[i].itype == NULL) - aarch64_simd_types[i].itype = - build_distinct_type_copy - (build_vector_type (eltype, GET_MODE_NUNITS (mode))); + { + aarch64_simd_types[i].itype + = build_distinct_type_copy + (build_vector_type (eltype, GET_MODE_NUNITS (mode))); + SET_TYPE_STRUCTURAL_EQUALITY (aarch64_simd_types[i].itype); + } tdecl = add_builtin_type (aarch64_simd_types[i].name, aarch64_simd_types[i].itype); TYPE_NAME (aarch64_simd_types[i].itype) = tdecl; - SET_TYPE_STRUCTURAL_EQUALITY (aarch64_simd_types[i].itype); } #define AARCH64_BUILD_SIGNED_TYPE(mode) \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ffb4314b9e6..ae150baa578 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-01-26 Roger Ferrer Ibáñez + + PR target/67896 + * gcc.target/aarch64/simd/pr67896.C: New. + 2016-01-26 Richard Sandiford PR tree-optimization/69400 diff --git a/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C b/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C new file mode 100644 index 00000000000..1f916e09f4f --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/simd/pr67896.C @@ -0,0 +1,7 @@ +typedef __Poly8_t A; +typedef __Poly16_t A; /* { dg-error "conflicting declaration" } */ +typedef __Poly64_t A; /* { dg-error "conflicting declaration" } */ +typedef __Poly128_t A; /* { dg-error "conflicting declaration" } */ + +typedef __Poly8x8_t B; +typedef __Poly16x8_t B; /* { dg-error "conflicting declaration" } */