summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr38932.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr38932.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr38932.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr38932.c b/gcc/testsuite/gcc.dg/pr38932.c
new file mode 100644
index 000000000..4dfaffc77
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr38932.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+/* This variable needed only to exercise FRE instead of CCP. */
+unsigned char g;
+
+extern void abort();
+
+void f (long long int p)
+{
+ g = 255;
+ if (p >= (-9223372036854775807LL - 1) - (signed char) g)
+ p = 1;
+
+ if (p)
+ abort ();
+}
+
+