PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr80706.c
blob7cc1b8f57b9b0209808f9c34fb14914b404aa28e
1 /* PR target/80706 */
2 /* { dg-do run { target sse2_runtime } } */
3 /* { dg-options "-O2 -msse2" } */
5 union U { double value; struct S { int lsw; int msw; } parts; };
7 __attribute__((noinline, noclone)) double
8 foo (void)
10 __asm volatile ("" : : : "memory");
11 return 2.0;
14 __attribute__((noinline, noclone)) double
15 bar (void)
17 double s = foo ();
18 union U z;
19 z.value = s;
20 z.parts.lsw = 0;
21 return z.value * z.value + s * s;
24 int
25 main ()
27 if (bar () != 8.0)
28 __builtin_abort ();
29 return 0;