2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr58006.C
blobfd3b7bebd8a9fbcb05e8cfb01d919c7e9f6b6f4c
1 // PR tree-optimization/58006
2 // { dg-do compile }
3 // { dg-require-effective-target pthread }
4 // { dg-options "-Ofast -ftree-parallelize-loops=2" }
6 extern "C" float sqrtf (float);
8 struct S
10   float i, j;
11   float foo () const { return sqrtf (i * i + j * j); }
12   S () : i (1), j (1) {}
15 void
16 bar (int a, int b)
18   int i;
19   float f;
20   for (i = a; i < b; i++)
21     f = S ().foo ();