summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/builtin-choose-expr-2.c
blob: d986b405ff03f7ab63c62dad67cc5cf16b9d5277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Test diagnostic for invalid use of __builtin_choose_expr.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "" } */

int a, b, c, d;

void
f (void)
{
  a = __builtin_choose_expr (b, c, d); /* { dg-error "first argument to '__builtin_choose_expr' not a constant" } */
}