aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-11-05 10:44:45 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-11-05 10:44:45 +0000
commit42cbaf83611647a0408569479c8dbb07db734c16 (patch)
tree50fb8aa68667aea1fe2332975a0a38a0a7b444f1 /gcc
parent08f2c4dba03abd19756159e72f68b246e89167f2 (diff)
downloadgcc-42cbaf83611647a0408569479c8dbb07db734c16.zip
gcc-42cbaf83611647a0408569479c8dbb07db734c16.tar.gz
gcc-42cbaf83611647a0408569479c8dbb07db734c16.tar.bz2
strlenopt-22g.c: New wrapper around...
* gcc.dg/strlenopt-22g.c: New wrapper around... * gcc.dg/strlenopt-22.c: ...this. Do not define USE_GNU and adjust. From-SVN: r181009
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-22.c6
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-22g.c14
3 files changed, 21 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a6e95c5..0d7be80 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/strlenopt-22g.c: New wrapper around...
+ * gcc.dg/strlenopt-22.c: ...this. Do not define USE_GNU and adjust.
+
2011-11-04 Jason Merrill <jason@redhat.com>
PR c++/26714
diff --git a/gcc/testsuite/gcc.dg/strlenopt-22.c b/gcc/testsuite/gcc.dg/strlenopt-22.c
index 541bfdc..3b019a5 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-22.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-22.c
@@ -1,7 +1,6 @@
/* { dg-do run } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
-#define USE_GNU
#include "strlenopt.h"
__attribute__((noinline, noclone)) size_t
@@ -32,10 +31,9 @@ main ()
return 0;
}
-/* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "strlen \\(" 3 "strlen" } } */
/* { dg-final { scan-tree-dump-times "memcpy \\(" 1 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "strcpy \\(" 1 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 1 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "stpcpy \\(" 1 "strlen" } } */
/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-22g.c b/gcc/testsuite/gcc.dg/strlenopt-22g.c
new file mode 100644
index 0000000..45c6345
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/strlenopt-22g.c
@@ -0,0 +1,14 @@
+/* This test needs runtime that provides stpcpy function. */
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-options "-O2 -fdump-tree-strlen" } */
+
+#define USE_GNU
+#include "strlenopt-22.c"
+
+/* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 1 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "strchr \\(" 1 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "stpcpy \\(" 1 "strlen" } } */
+/* { dg-final { cleanup-tree-dump "strlen" } } */