Debian Codegraph @

gcc/testsuite/gcc.dg/pr112369.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3" } */
3 /* { dg-additional-options "-mavx2" { target avx2 } } */
4
5 struct GdkRGBA2 {
6 double a[4];
7 };
8 struct GdkRGBA3 {
9 float a[4];
10 };
11 struct GdkRGBA3 f(struct GdkRGBA2 *color) {
12 struct GdkRGBA3 t1;
13 for(int i = 0; i < 4; i++)
14 t1.a[i] = color->a[i];
15 struct GdkRGBA3 t2;
16 for(int i = 0; i < 4; i++)
17 {
18 float tmp = t1.a[i];
19 if (__builtin_isnan(tmp))
20 t2.a[i] = tmp;
21 }
22 return t2;
23 }