On Mon, Sep 02, 2019 at 01:29:24AM -0700, Andrew Pinski wrote:
> Seems like this would fix PR91632 also.
> Which has a C testcase included.

Indeed, I've committed the following after testing it with the
patch reverted as well as with current trunk where it doesn't FAIL anymore.

2019-09-02  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/91632
        * gcc.c-torture/execute/pr91632.c: New test.

--- gcc/testsuite/gcc.c-torture/execute/pr91632.c.jj    2019-09-02 
15:28:10.598774511 +0200
+++ gcc/testsuite/gcc.c-torture/execute/pr91632.c       2019-09-02 
15:28:00.540925398 +0200
@@ -0,0 +1,30 @@
+/* PR tree-optimization/91632 */
+/* { dg-additional-options "-fwrapv" } */
+
+static int
+__attribute__((noipa))
+foo (char x)
+{
+  switch (x)
+    {
+    case '"':
+    case '<':
+    case '>':
+    case '\\':
+    case '^':
+    case '`':
+    case '{':
+    case '|':
+    case '}':
+      return 0;
+    }
+  return 1;
+}
+
+int
+main ()
+{
+  if (foo ('h') == 0)
+    __builtin_abort ();
+  return 0;
+}


        Jakub

Reply via email to