testsuite: Test evrp-trans.c also with unsigned types [PR104115]
authorJakub Jelinek <jakub@redhat.com>
Wed, 19 Jan 2022 14:02:31 +0000 (15:02 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 19 Jan 2022 14:02:31 +0000 (15:02 +0100)
The testcase from the PR got fixed with r12-3119-g675a3e40567e1d
and looks quite similar to the evrp-trans.c test, except evrp-trans.c
is tested on signed integer types.
I think it would be useful to test it for unsigned comparisons too.

2022-01-19  Jakub Jelinek  <jakub@redhat.com>

PR c/104115
* gcc.dg/tree-ssa/evrp-trans2.c: New test.

gcc/testsuite/gcc.dg/tree-ssa/evrp-trans2.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/evrp-trans2.c b/gcc/testsuite/gcc.dg/tree-ssa/evrp-trans2.c
new file mode 100644 (file)
index 0000000..d6fe427
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-evrp" } */
+
+#define int unsigned
+#include "evrp-trans.c"
+
+/* { dg-final { scan-tree-dump-not "kill" "evrp" } }  */
+/* { dg-final { scan-tree-dump-times "keep" 13 "evrp"} } */