From a422f68924dbe9e0d8c4b0a0acbbadeaf0965d49 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 3 Mar 2020 07:58:12 +0100 Subject: [PATCH] testsuite: Add testcases for already fixed PR [PR93927] 2020-03-03 Jakub Jelinek PR tree-optimization/93927 * gcc.c-torture/compile/pr93927-1.c: New test. * gcc.c-torture/compile/pr93927-2.c: New test. --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.c-torture/compile/pr93927-1.c | 9 +++++++++ gcc/testsuite/gcc.c-torture/compile/pr93927-2.c | 9 +++++++++ 3 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr93927-1.c create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr93927-2.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6418eb2fd94..2e316a3f744 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-03-03 Jakub Jelinek + + PR tree-optimization/93927 + * gcc.c-torture/compile/pr93927-1.c: New test. + * gcc.c-torture/compile/pr93927-2.c: New test. + 2020-03-03 Jun Ma * g++.dg/coroutines/torture/co-await-14-template-traits.C: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr93927-1.c b/gcc/testsuite/gcc.c-torture/compile/pr93927-1.c new file mode 100644 index 00000000000..c77521fdfad --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr93927-1.c @@ -0,0 +1,9 @@ +/* PR tree-optimization/93927 */ + +__SIZE_TYPE__ strstr (const char *, const char *); + +char * +foo (char *x) +{ + return !!strstr (x, "0") ? "0" : "1"; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr93927-2.c b/gcc/testsuite/gcc.c-torture/compile/pr93927-2.c new file mode 100644 index 00000000000..4834ece2d02 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr93927-2.c @@ -0,0 +1,9 @@ +/* PR tree-optimization/93927 */ + +__SIZE_TYPE__ strchr (const char *, int); + +char * +foo (char *x) +{ + return !!strchr (x, 0) ? "0" : "1"; +} -- 2.30.2