1/* { dg-do run } */
2/* { dg-options "-O2 -fopenmp" } */
3/* { dg-options "-O2 -fopenmp -march=nocona" { target i?86-*-* x86_64-*-* } } */
4/* { dg-options "-O2 -fopenmp" { target ilp32 } } */
5
6double d = 1.5;
7long double ld = 3;
8extern void abort (void);
9
10void
11test (void)
12{
13#pragma omp atomic
14  d *= 1.25;
15#pragma omp atomic
16  ld /= 0.75;
17  if (d != 1.875 || ld != 4.0L)
18    abort ();
19}
20
21int
22main (void)
23{
24#ifdef __x86_64__
25# define bit_SSE3 (1 << 0)
26# define bit_CX16 (1 << 13)
27  unsigned int ax, bx, cx, dx;
28  __asm__ ("cpuid" : "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx)
29           : "0" (1) : "cc");
30  if ((cx & (bit_SSE3 | bit_CX16)) != (bit_SSE3 | bit_CX16))
31    return 0;
32#endif
33  test ();
34  return 0;
35}
36