Commit b59ff586 by Martin Sebor Committed by Martin Sebor

PR testsuite/91132 - test gcc.dg/strlenopt-67.c in r273317 fails

gcc/testsuite/ChangeLog:
	* gcc.dg/strlenopt-67.c: Removed second copy of test.

From-SVN: r273358
parent 613caed2
2019-07-10 Martin Sebor <msebor@redhat.com>
PR testsuite/91132
* gcc.dg/strlenopt-67.c: Removed second copy of test.
2019-07-10 Vladimir Makarov <vmakarov@redhat.com>
PR target/91102
......
......@@ -50,55 +50,3 @@ int f8 (void)
}
/* { dg-final { scan-tree-dump-times "abort|strlen" 0 "optimized" } } */
/* PR tree-optimization/ - incorrrect strlen result after second strcpy
into the same destination.
{ dg-do compile }
{ dg-options "-O2 -Wall -fdump-tree-optimized" } */
// #include "strlenopt.h"
char a[4];
int f4 (void)
{
char b[4];
__builtin_strcpy (b, "12");
int i = __builtin_strcmp (a, b);
__builtin_strcpy (b, "123");
if (__builtin_strlen (b) != 3)
__builtin_abort ();
return i;
}
int f6 (void)
{
char b[6];
__builtin_strcpy (b, "1234");
int i = __builtin_strcmp (a, b);
__builtin_strcpy (b, "12345");
if (__builtin_strlen (b) != 5)
__builtin_abort ();
return i;
}
int f8 (void)
{
char b[8];
__builtin_strcpy (b, "1234");
int i = __builtin_strcmp (a, b);
__builtin_strcpy (b, "1234567");
if (__builtin_strlen (b) != 7)
__builtin_abort ();
return i;
}
/* { dg-final { scan-tree-dump-times "abort|strlen" 0 "optimized" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment