From: Martin Sebor Date: Wed, 10 Jul 2019 16:15:52 +0000 (+0000) Subject: PR testsuite/91132 - test gcc.dg/strlenopt-67.c in r273317 fails X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b59ff58620d1d4ffff5c74bd9f9f10f3cb222d8e;p=gcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6b2bf884bfd..7172061a835 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-10 Martin Sebor + + PR testsuite/91132 + * gcc.dg/strlenopt-67.c: Removed second copy of test. + 2019-07-10 Vladimir Makarov PR target/91102 diff --git a/gcc/testsuite/gcc.dg/strlenopt-67.c b/gcc/testsuite/gcc.dg/strlenopt-67.c index a2bcfba68ba..e1b1de27d9e 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-67.c +++ b/gcc/testsuite/gcc.dg/strlenopt-67.c @@ -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" } } */