This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix up go regressions caused by my recent switchconv changes (PR go/91617)


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  <jakub@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]