aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gnu99-const-expr-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gnu99-const-expr-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/gnu99-const-expr-2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gnu99-const-expr-2.c b/gcc/testsuite/gcc.dg/gnu99-const-expr-2.c
index f868c53..f9acef8 100644
--- a/gcc/testsuite/gcc.dg/gnu99-const-expr-2.c
+++ b/gcc/testsuite/gcc.dg/gnu99-const-expr-2.c
@@ -20,4 +20,7 @@ f (void)
a = __builtin_choose_expr ((void *)0, b, c); /* { dg-error "constant" } */
a = __builtin_choose_expr (0 * (INT_MAX + 1), b, c); /* { dg-warning "integer overflow in expression" } */
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 21 } */
+ a = __builtin_choose_expr (1 / 0, 0, 0); /* { dg-warning "division by zero" } */
+ /* { dg-error "not a constant" "error" { target *-*-* } 23 } */
+ a = __builtin_choose_expr ((1 ? 1 : a), b, c); /* { dg-error "constant" } */
}