aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr61045.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/pr61045.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr61045.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/pr61045.c b/gcc-4.9/gcc/testsuite/gcc.dg/pr61045.c
new file mode 100644
index 000000000..1808cdc25
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/pr61045.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+/* { dg-options "-fstrict-overflow" } */
+
+int main ()
+{
+ int a = 0;
+ int b = __INT_MAX__;
+ int t = (a - 2) > (b - 1);
+ if (t != 0)
+ __builtin_abort();
+ return 0;
+}