diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-03-03 07:58:12 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-03-03 07:58:12 +0100 |
commit | a422f68924dbe9e0d8c4b0a0acbbadeaf0965d49 (patch) | |
tree | b7ab364494f6e934ab106811e72161dd975874e9 /gcc/testsuite/gcc.c-torture | |
parent | fd9e021c70edf459e5d700af90bfe005dc0afb3b (diff) | |
download | gcc-a422f68924dbe9e0d8c4b0a0acbbadeaf0965d49.zip gcc-a422f68924dbe9e0d8c4b0a0acbbadeaf0965d49.tar.gz gcc-a422f68924dbe9e0d8c4b0a0acbbadeaf0965d49.tar.bz2 |
testsuite: Add testcases for already fixed PR [PR93927]
2020-03-03 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/93927
* gcc.c-torture/compile/pr93927-1.c: New test.
* gcc.c-torture/compile/pr93927-2.c: New test.
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr93927-1.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr93927-2.c | 9 |
2 files changed, 18 insertions, 0 deletions
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 0000000..c77521f --- /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 0000000..4834ece --- /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"; +} |