n Fri, Aug 24, 2018 at 1:02 AM Aldy Hernandez <al...@redhat.com> wrote: > > I have no idea how this passed bootstrap and tests in other languages. > > The problem here is that wide_int_binop is overflowing on TRUNC_DIV_EXPR > and a range in Go. This is causing us to use wmin/wmax uninitialized. > > Serves me right for all my whining about Ada yesterday. I think the VRP > changes are sufficiently all encompassing that I will start testing > --enable-languages=all instead of whatever our defaults are. My bad. > > Committed as obvious.
This patch also fixed: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87092 I am checking in this patch to add a testcase. -- H.J.
From 89dabc2d6e95ebac507cdfe082085af6b3ec4701 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <hjl.to...@gmail.com> Date: Fri, 24 Aug 2018 09:50:56 -0700 Subject: [PATCH] Add a testcase for PR middle-end/87092 PR middle-end/87092 * gcc.dg/pr87092.c: New. --- gcc/testsuite/gcc.dg/pr87092.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr87092.c diff --git a/gcc/testsuite/gcc.dg/pr87092.c b/gcc/testsuite/gcc.dg/pr87092.c new file mode 100644 index 00000000000..4a6faebbd93 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87092.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fwrapv" } */ + +int a, b; + +void +c(void) { + if (b) + b = a / b; +} -- 2.17.1