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
This commit is contained in:
parent
613caed2fe
commit
b59ff58620
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2019-07-10 Vladimir Makarov <vmakarov@redhat.com>
|
||||||
|
|
||||||
PR target/91102
|
PR target/91102
|
||||||
|
@ -50,55 +50,3 @@ int f8 (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* { dg-final { scan-tree-dump-times "abort|strlen" 0 "optimized" } } */
|
/* { 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" } } */
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user