blob: 0be03e652ba045fdd064bcedc3fb351091a6d82e [file] [log] [blame]
Andrew Geisslerc926e172021-05-07 16:11:35 -05001From bb171ef618f8892bd56e57ae41ecb6e02caa8173 Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: RAGHUNATH LOLUR <raghunath.lolur@kpit.com>
3Date: Wed, 6 Dec 2017 22:52:26 -0800
Andrew Geisslerc182c622020-05-15 14:13:32 -05004Subject: [PATCH] Fix for testsuite failure
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
62017-11-16 Raghunath Lolur <raghunath.lolur@kpit.com>
7
8 * gcc.dg/pr56275.c: If SSE is disabled, ensure that
9 "-mfpmath" is not set to use SSE. Set "-mfpmath=387".
10 * gcc.dg/pr68306.c: Likewise
11 * gcc.dg/pr68306-2.c: Likewise
12 * gcc.dg/pr68306-3.c: Likewise
13 * gcc.dg/pr69634.c: Likewise
14 * gcc.target/i386/amd64-abi-1.c: Likewise
15 * gcc.target/i386/funcspec-6.c: Likewise
16 * gcc.target/i386/interrupt-387-err-1.c: Likewise
17 * gcc.target/i386/isa-14.c: Likewise
18 * gcc.target/i386/pr44948-2b.c: Likewise
19 * gcc.target/i386/pr53425-1.c: Likewise
20 * gcc.target/i386/pr53425-2.c: Likewise
21 * gcc.target/i386/pr55247.c: Likewise
22 * gcc.target/i386/pr59644.c: Likewise
23 * gcc.target/i386/pr62120.c: Likewise
24 * gcc.target/i386/pr70467-1.c: Likewise
25 * gcc.target/i386/warn-vect-op-1.c: Likewise
26
27If -Wall, -Werror are used during compilation various test cases fail
28to compile.
29
30If SSE is disabled, be sure to -mfpmath=387 to resolve this.
31
32This patch removes the changes to Changelog from the original patch.
33This will help us avoid conflicts.
34
35Upstream-Status: Pending
36
37Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
38---
39 gcc/testsuite/gcc.dg/pr56275.c | 2 +-
40 gcc/testsuite/gcc.dg/pr68306-2.c | 2 +-
41 gcc/testsuite/gcc.dg/pr68306-3.c | 2 +-
42 gcc/testsuite/gcc.dg/pr68306.c | 2 +-
43 gcc/testsuite/gcc.dg/pr69634.c | 2 +-
44 gcc/testsuite/gcc.target/i386/amd64-abi-1.c | 2 +-
45 gcc/testsuite/gcc.target/i386/funcspec-6.c | 1 +
46 gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c | 2 +-
47 gcc/testsuite/gcc.target/i386/isa-14.c | 2 +-
48 gcc/testsuite/gcc.target/i386/pr44948-2b.c | 2 +-
49 gcc/testsuite/gcc.target/i386/pr53425-1.c | 2 +-
50 gcc/testsuite/gcc.target/i386/pr53425-2.c | 2 +-
51 gcc/testsuite/gcc.target/i386/pr55247.c | 2 +-
52 gcc/testsuite/gcc.target/i386/pr59644.c | 2 +-
53 gcc/testsuite/gcc.target/i386/pr62120.c | 2 +-
54 gcc/testsuite/gcc.target/i386/pr70467-1.c | 2 +-
55 gcc/testsuite/gcc.target/i386/warn-vect-op-1.c | 2 +-
56 17 files changed, 17 insertions(+), 16 deletions(-)
57
58diff --git a/gcc/testsuite/gcc.dg/pr56275.c b/gcc/testsuite/gcc.dg/pr56275.c
59index b901bb2b199..a4f6c95e1a1 100644
60--- a/gcc/testsuite/gcc.dg/pr56275.c
61+++ b/gcc/testsuite/gcc.dg/pr56275.c
62@@ -1,6 +1,6 @@
63 /* { dg-do compile } */
64 /* { dg-options "-O2" } */
65-/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
66+/* { dg-additional-options "-mno-sse -mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */
67
68 typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long))));
69
70diff --git a/gcc/testsuite/gcc.dg/pr68306-2.c b/gcc/testsuite/gcc.dg/pr68306-2.c
71index 4672ebe7987..2a368c484b6 100644
72--- a/gcc/testsuite/gcc.dg/pr68306-2.c
73+++ b/gcc/testsuite/gcc.dg/pr68306-2.c
74@@ -1,6 +1,6 @@
75 /* { dg-do compile } */
76 /* { dg-options "-O3" } */
77-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
78+/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
79
80 struct {
81 int tz_minuteswest;
82diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c
83index f5a8c102cf8..df3390c64c2 100644
84--- a/gcc/testsuite/gcc.dg/pr68306-3.c
85+++ b/gcc/testsuite/gcc.dg/pr68306-3.c
86@@ -1,6 +1,6 @@
87 /* { dg-do compile } */
88 /* { dg-options "-O3" } */
89-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
90+/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
91 /* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */
92
93 extern void fn2();
94diff --git a/gcc/testsuite/gcc.dg/pr68306.c b/gcc/testsuite/gcc.dg/pr68306.c
95index 54e5b40f221..0813389e2c1 100644
96--- a/gcc/testsuite/gcc.dg/pr68306.c
97+++ b/gcc/testsuite/gcc.dg/pr68306.c
98@@ -1,6 +1,6 @@
99 /* { dg-do compile } */
100 /* { dg-options "-O3" } */
101-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
102+/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
103
104 enum powerpc_pmc_type { PPC_PMC_IBM };
105 struct {
106diff --git a/gcc/testsuite/gcc.dg/pr69634.c b/gcc/testsuite/gcc.dg/pr69634.c
107index 60a56149463..bcc23f9ccd6 100644
108--- a/gcc/testsuite/gcc.dg/pr69634.c
109+++ b/gcc/testsuite/gcc.dg/pr69634.c
110@@ -1,6 +1,6 @@
111 /* { dg-do compile } */
112 /* { dg-options "-O2 -fno-dce -fschedule-insns -fno-tree-vrp -fcompare-debug -Wno-psabi" } */
113-/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */
114+/* { dg-additional-options "-mno-sse -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
115 /* { dg-require-effective-target scheduling } */
116
117 typedef unsigned short u16;
118diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
119index 69fde57bf06..7f1f1c03edf 100644
120--- a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
121+++ b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
122@@ -1,5 +1,5 @@
123 /* { dg-do compile { target { ! ia32 } } } */
124-/* { dg-options "-mno-sse" } */
125+/* { dg-options "-mno-sse -mfpmath=387" } */
126 /* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */
127
128 double foo(void) { return 0; } /* { dg-error "SSE disabled" } */
129diff --git a/gcc/testsuite/gcc.target/i386/funcspec-6.c b/gcc/testsuite/gcc.target/i386/funcspec-6.c
130index ea896b7ebfd..bf15569b826 100644
131--- a/gcc/testsuite/gcc.target/i386/funcspec-6.c
132+++ b/gcc/testsuite/gcc.target/i386/funcspec-6.c
133@@ -1,6 +1,7 @@
134 /* Test whether all of the 64-bit function specific options are accepted
135 without error. */
136 /* { dg-do compile { target { ! ia32 } } } */
137+/* { dg-additional-options "-mfpmath=387" } */
138
139 #include "funcspec-56.inc"
140
141diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
142index 8561a3c26d6..6377f814645 100644
143--- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
144+++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
145@@ -1,5 +1,5 @@
146 /* { dg-do compile } */
147-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387" } */
148+/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387 -mfpmath=387" } */
149
150 typedef unsigned int uword_t __attribute__ ((mode (__word__)));
151
152diff --git a/gcc/testsuite/gcc.target/i386/isa-14.c b/gcc/testsuite/gcc.target/i386/isa-14.c
153index 5d49e6e77fe..1de2db92bdd 100644
154--- a/gcc/testsuite/gcc.target/i386/isa-14.c
155+++ b/gcc/testsuite/gcc.target/i386/isa-14.c
156@@ -1,5 +1,5 @@
157 /* { dg-do run } */
158-/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse" } */
159+/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse -mfpmath=387" } */
160
161 extern void abort (void);
162
163diff --git a/gcc/testsuite/gcc.target/i386/pr44948-2b.c b/gcc/testsuite/gcc.target/i386/pr44948-2b.c
164index fa1769b62fb..f79fb12726f 100644
165--- a/gcc/testsuite/gcc.target/i386/pr44948-2b.c
166+++ b/gcc/testsuite/gcc.target/i386/pr44948-2b.c
167@@ -1,5 +1,5 @@
168 /* { dg-do compile } */
169-/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic" } */
170+/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic -mfpmath=387" } */
171
172 struct A
173 {
174diff --git a/gcc/testsuite/gcc.target/i386/pr53425-1.c b/gcc/testsuite/gcc.target/i386/pr53425-1.c
175index 2e89ff7d81d..6339bf6b736 100644
176--- a/gcc/testsuite/gcc.target/i386/pr53425-1.c
177+++ b/gcc/testsuite/gcc.target/i386/pr53425-1.c
178@@ -1,6 +1,6 @@
179 /* PR target/53425 */
180 /* { dg-do compile { target { ! ia32 } } } */
181-/* { dg-options "-O2 -mno-sse" } */
182+/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
183 /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
184
185 typedef double __v2df __attribute__ ((__vector_size__ (16)));
186diff --git a/gcc/testsuite/gcc.target/i386/pr53425-2.c b/gcc/testsuite/gcc.target/i386/pr53425-2.c
187index 61f6283dbe9..2c5a55f0ac3 100644
188--- a/gcc/testsuite/gcc.target/i386/pr53425-2.c
189+++ b/gcc/testsuite/gcc.target/i386/pr53425-2.c
190@@ -1,6 +1,6 @@
191 /* PR target/53425 */
192 /* { dg-do compile { target { ! ia32 } } } */
193-/* { dg-options "-O2 -mno-sse" } */
194+/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
195 /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
196
197 typedef float __v2sf __attribute__ ((__vector_size__ (8)));
198diff --git a/gcc/testsuite/gcc.target/i386/pr55247.c b/gcc/testsuite/gcc.target/i386/pr55247.c
199index 23366d0909d..9810e3abb76 100644
200--- a/gcc/testsuite/gcc.target/i386/pr55247.c
201+++ b/gcc/testsuite/gcc.target/i386/pr55247.c
202@@ -1,6 +1,6 @@
203 /* { dg-do compile { target { ! ia32 } } } */
204 /* { dg-require-effective-target maybe_x32 } */
205-/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */
206+/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long -mfpmath=387" } */
207
208 typedef unsigned int uint32_t;
209 typedef uint32_t Elf32_Word;
210diff --git a/gcc/testsuite/gcc.target/i386/pr59644.c b/gcc/testsuite/gcc.target/i386/pr59644.c
211index 96006b3e338..4287e4538bf 100644
212--- a/gcc/testsuite/gcc.target/i386/pr59644.c
213+++ b/gcc/testsuite/gcc.target/i386/pr59644.c
214@@ -1,6 +1,6 @@
215 /* PR target/59644 */
216 /* { dg-do run { target lp64 } } */
217-/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone" } */
218+/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone -mfpmath=387" } */
219
220 /* This test uses __builtin_trap () instead of e.g. abort,
221 because due to -mpreferred-stack-boundary=3 it should not call
222diff --git a/gcc/testsuite/gcc.target/i386/pr62120.c b/gcc/testsuite/gcc.target/i386/pr62120.c
Andrew Geisslerc182c622020-05-15 14:13:32 -0500223index 28d85d37712..c93266bd4bc 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -0500224--- a/gcc/testsuite/gcc.target/i386/pr62120.c
225+++ b/gcc/testsuite/gcc.target/i386/pr62120.c
226@@ -1,5 +1,5 @@
227 /* { dg-do compile } */
228-/* { dg-options "-mno-sse" } */
229+/* { dg-options "-mno-sse -mfpmath=387" } */
230
231 void foo ()
232 {
233diff --git a/gcc/testsuite/gcc.target/i386/pr70467-1.c b/gcc/testsuite/gcc.target/i386/pr70467-1.c
234index 4e112c88d07..bcfb396a68d 100644
235--- a/gcc/testsuite/gcc.target/i386/pr70467-1.c
236+++ b/gcc/testsuite/gcc.target/i386/pr70467-1.c
237@@ -1,6 +1,6 @@
238 /* PR rtl-optimization/70467 */
239 /* { dg-do compile } */
240-/* { dg-options "-O2 -mno-sse" } */
241+/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
242
243 void foo (unsigned long long *);
244
245diff --git a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
246index 6cda1534311..26e37f5b8ba 100644
247--- a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
248+++ b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
249@@ -1,5 +1,5 @@
250 /* { dg-do compile { target { ! ia32 } } } */
251-/* { dg-options "-mno-sse -Wvector-operation-performance" } */
252+/* { dg-options "-mno-sse -Wvector-operation-performance -mfpmath=387" } */
253 #define vector(elcount, type) \
254 __attribute__((vector_size((elcount)*sizeof(type)))) type
255