Debian Codegraph @

gcc/testsuite/gcc.target/i386/20020523.c

raw
1 /* PR target/6753
2 This testcase was miscompiled because sse_mov?fcc_const0*
3 patterns were missing earlyclobber. */
4
5 /* { dg-do run } */
6 /* { dg-options "-O2 -msse -mfpmath=sse -ffast-math" } */
7 /* { dg-require-effective-target sse } */
8
9 #include "sse-check.h"
10
11 float one = 1.f;
12
13 void bar (float f)
14 {
15 if (__builtin_memcmp (&one, &f, sizeof (float)))
16 abort ();
17 }
18
19 float foo (void)
20 {
21 return 1.f;
22 }
23
24 typedef struct
25 {
26 float t;
27 } T;
28
29 static void
30 sse_test (void)
31 {
32 int i;
33 T x[1];
34
35 for (i = 0; i < 1; i++)
36 {
37 x[i].t = foo ();
38 x[i].t = 0.f > x[i].t ? 0.f : x[i].t;
39 bar (x[i].t);
40 }
41 }