From 3fe126afd1b2fb9177e419ecc64143afd9e20f15 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 12 Mar 2018 13:32:44 +0000 Subject: [PATCH] Add a testcase for PR 84799 This was introduced by r258390 and fixed by r258415. * gcc.dg/pr84799.c: New test. From-SVN: r258448 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/pr84799.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr84799.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c13747a..c719306 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-03-12 H.J. Lu + + * gcc.dg/pr84799.c: New test. + 2018-03-12 Richard Biener PR tree-optimization/84803 diff --git a/gcc/testsuite/gcc.dg/pr84799.c b/gcc/testsuite/gcc.dg/pr84799.c new file mode 100644 index 0000000..2b3a48f --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr84799.c @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ + +int a, g; +long b, f; +short c, d, e; + +static void fn1 () +{ + if (a) + { + long i = 5, j = b / i | c; + int k = b % (d % i) & j; + short l = ~f % (-d / j ^ -e), m = e << (d - l); + if (k) + m = d; + i = d | (i & b); + g = (c | ~f) % i + l; + e = (c - f) & e; + d = m; + } +} + +int main () +{ + b |= 1; + fn1 (); + return 0; +} -- 2.7.4