From 1525fa83cc704ba18738eb2eab76a7f4d6bfde6b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 2 Sep 2019 15:35:54 +0200 Subject: [PATCH] re PR tree-optimization/91632 (Probably wrong code since r275026) PR tree-optimization/91632 * gcc.c-torture/execute/pr91632.c: New test. From-SVN: r275318 --- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gcc.c-torture/execute/pr91632.c | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr91632.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b6dbf768167..3f46b84c0bc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-09-02 Jakub Jelinek + + PR tree-optimization/91632 + * gcc.c-torture/execute/pr91632.c: New test. + 2019-09-02 Eric Botcazou * gcc.dg/tree-ssa/slsr-42.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/pr91632.c b/gcc/testsuite/gcc.c-torture/execute/pr91632.c new file mode 100644 index 00000000000..c16c3da4efd --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr91632.c @@ -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; +} -- 2.30.2