pr48591.c 439 B

1234567891011121314151617181920212223
  1. /* PR middle-end/48591 */
  2. /* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* ia64-*-linux* x86_64-*-freebsd* } } */
  3. /* { dg-options "-fopenmp" } */
  4. extern void abort (void);
  5. int
  6. main ()
  7. {
  8. __float128 f = 0.0;
  9. int i;
  10. #pragma omp parallel for reduction(+:f)
  11. for (i = 0; i < 128; i++)
  12. f += 0.5Q;
  13. if (f != 64.0Q)
  14. abort ();
  15. #pragma omp atomic
  16. f += 8.5Q;
  17. if (f != 72.5Q)
  18. abort ();
  19. return 0;
  20. }