This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix up go regressions caused by my recent switchconv changes (PR go/91617)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: Richard Biener <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 2 Sep 2019 15:36:52 +0200
- Subject: Re: [PATCH] Fix up go regressions caused by my recent switchconv changes (PR go/91617)
- References: <20190831131207.GF2120@tucnak> <E2E51816-8914-4806-B37B-31C010907DAC@suse.de> <20190831174117.GG2120@tucnak> <B2AB5F90-01CB-4AE1-AA44-6ED97A349719@suse.de> <20190901163425.GK2120@tucnak> <D9B22C84-0211-4A83-A518-EF00CF644479@suse.de> <20190902081421.GL2120@tucnak> <CA+=Sn1=5Xj_REutcOtVKZ33uMDMrWpV0uvw+HLjMdo9vRd_ckA@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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