From: Jakub Jelinek Date: Tue, 3 Mar 2020 06:58:12 +0000 (+0100) Subject: testsuite: Add testcases for already fixed PR [PR93927] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a422f68924dbe9e0d8c4b0a0acbbadeaf0965d49;p=gcc.git 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. --- 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"; +}