summaryrefslogtreecommitdiff
path: root/0235-Backport-SME-aarch64-Update-sizeless-tests-for-recen.patch
blob: 04a80d1cdb96b5985d0d9dbc8a8f6cd85c52c16e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
From 67001778883e10110c505dd8876a447a19d1ac5e Mon Sep 17 00:00:00 2001
From: Richard Sandiford <richard.sandiford@arm.com>
Date: Wed, 31 Aug 2022 15:39:27 +0100
Subject: [PATCH 136/157] [Backport][SME] aarch64: Update sizeless tests for
 recent GNU C changes

Reference: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=de9805c08121a84ce368dccfe043a3f44c3ff13b

The tests for sizeless SVE types include checks that the types
are handled for initialisation purposes in the same way as scalars.
GNU C and C2x now allow scalars to be initialised using empty braces,
so this patch updates the SVE tests to match.

gcc/testsuite/
	* gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c: Update
	tests for empty initializers.
	* gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c: Likewise.
	* gcc.target/aarch64/sve/acle/general-c/sizeless-1.c: Likewise.
	* gcc.target/aarch64/sve/acle/general-c/sizeless-2.c: Likewise.
---
 .../gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c     | 4 ++--
 .../gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c     | 4 ++--
 .../gcc.target/aarch64/sve/acle/general-c/sizeless-1.c        | 4 ++--
 .../gcc.target/aarch64/sve/acle/general-c/sizeless-2.c        | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c
index 285751eeb..9db953583 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c
@@ -12,7 +12,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1,
   /* Initialization.  */
 
   svuint8_t init_sve_u1 = 0; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */
-  svuint8_t init_sve_u2 = {}; /* { dg-error {empty scalar initializer} } */
+  svuint8_t init_sve_u2 = {};
   svuint8_t init_sve_u3 = { sve_u1 };
   svuint8_t init_sve_u4 = { gnu_u1 };
   svuint8_t init_sve_u5 = { sve_s1 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'svint8_t'} } */
@@ -31,7 +31,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1,
 
   /* Compound literals.  */
 
-  (svuint8_t) {}; /* { dg-error {empty scalar initializer} } */
+  (svuint8_t) {};
   (svuint8_t) { 0 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */
   (svuint8_t) { sve_u1 };
   (svuint8_t) { gnu_u1 };
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c
index 306fd4780..c05b16406 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c
@@ -12,7 +12,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1,
   /* Initialization.  */
 
   svuint8_t init_sve_u1 = 0; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */
-  svuint8_t init_sve_u2 = {}; /* { dg-error {empty scalar initializer} } */
+  svuint8_t init_sve_u2 = {};
   svuint8_t init_sve_u3 = { sve_u1 };
   svuint8_t init_sve_u4 = { gnu_u1 };
   svuint8_t init_sve_u5 = { sve_s1 };
@@ -31,7 +31,7 @@ f (svuint8_t sve_u1, svint8_t sve_s1,
 
   /* Compound literals.  */
 
-  (svuint8_t) {}; /* { dg-error {empty scalar initializer} } */
+  (svuint8_t) {};
   (svuint8_t) { 0 }; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */
   (svuint8_t) { sve_u1 };
   (svuint8_t) { gnu_u1 };
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c
index 7fc51e7ad..4b34a71c1 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c
@@ -66,14 +66,14 @@ statements (int n)
 
   svint8_t init_sve_sc1 = sve_sc1;
   svint8_t init_sve_sc2 = sve_sh1; /* { dg-error {incompatible types when initializing type 'svint8_t' using type 'svint16_t'} } */
-  svint8_t init_sve_sc3 = {}; /* { dg-error {empty scalar initializer} } */
+  svint8_t init_sve_sc3 = {};
 
   int initi_a = sve_sc1; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */
   int initi_b = { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */
 
   /* Compound literals.  */
 
-  (svint8_t) {}; /* { dg-error {empty scalar initializer} } */
+  (svint8_t) {};
   (svint8_t) { sve_sc1 };
 
   (int) { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c
index c575492c1..34dfd598e 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-2.c
@@ -66,14 +66,14 @@ statements (int n)
 
   svint8_t init_sve_sc1 = sve_sc1;
   svint8_t init_sve_sc2 = sve_sh1; /* { dg-error {incompatible types when initializing type 'svint8_t' using type 'svint16_t'} } */
-  svint8_t init_sve_sc3 = {}; /* { dg-error {empty scalar initializer} } */
+  svint8_t init_sve_sc3 = {};
 
   int initi_a = sve_sc1; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */
   int initi_b = { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */
 
   /* Compound literals.  */
 
-  (svint8_t) {}; /* { dg-error {empty scalar initializer} } */
+  (svint8_t) {};
   (svint8_t) { sve_sc1 };
 
   (int) { sve_sc1 }; /* { dg-error {incompatible types when initializing type 'int' using type 'svint8_t'} } */
-- 
2.33.0