2011-04-13 17:50:02 +02:00
|
|
|
/* PR middle-end/48591 */
|
2017-02-15 17:35:54 +01:00
|
|
|
/* { dg-do run { target __float128 } } */
|
2015-06-15 15:26:12 +02:00
|
|
|
/* { dg-options "-O0" } */
|
2017-02-15 17:35:54 +01:00
|
|
|
/* { dg-add-options __float128 } */
|
2011-04-13 17:50:02 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|