[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / ext / vector21.C
blobb29b7ebb9fcfe5c932a8b6e074263ea21af7afa9
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-gimple" } */
4 typedef int vec __attribute__ ((vector_size (4 * sizeof (int))));
6 void f1 (vec *x)
8   *x = (*x >= 0) ? *x : -*x;
10 void f2 (vec *x)
12   *x = (0 < *x) ? *x : -*x;
14 void g1 (vec *x)
16   *x = (*x < 0) ? -*x : *x;
18 void g2 (vec *x)
20   *x = (0 > *x) ? -*x : *x;
22 void h (vec *x, vec *y)
24   *x = (*x < *y) ? *y : *x;
26 void i (vec *x, vec *y)
28   *x = (*x < *y) ? *x : *y;
30 void j (vec *x, vec *y)
32   *x = (*x < *y) ? *x : *x;
35 /* { dg-final { scan-tree-dump-times "ABS_EXPR" 4 "gimple" } } */
36 /* { dg-final { scan-tree-dump "MIN_EXPR" "gimple" } } */
37 /* { dg-final { scan-tree-dump "MAX_EXPR" "gimple" } } */
38 /* { dg-final { scan-tree-dump-not "VEC_COND_EXPR" "gimple" } } */