summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/pr48591.c
blob: 18dfd7f47be04e7ed6b45116fe3526f71b4d871e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR middle-end/48591 */
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* } } */
/* { dg-options "-fopenmp" } */

extern void abort (void);

int
main ()
{
  __float128 f = 0.0;
  int i;
  #pragma omp parallel for reduction(+:f)
    for (i = 0; i < 128; i++)
      f += 0.5Q;
  if (f != 64.0Q)
    abort ();
  #pragma omp atomic
    f += 8.5Q;
  if (f != 72.5Q)
    abort ();
  return 0;
}