aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/overflow-2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/overflow-2.c b/gcc/testsuite/gcc.dg/overflow-2.c
new file mode 100644
index 0000000..23c22a6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/overflow-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -pedantic-errors" } */
+
+/* PR c/24599 */
+
+int
+main (void)
+{
+ if ((_Bool)(__INT_MAX__ + 1)) /* { dg-warning "overflow in expression" } */
+ return 1;
+ else
+ return 0;
+}