X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fgcc.c-torture%2Fexecute%2Fstring-opt-13.c;fp=gcc%2Ftestsuite%2Fgcc.c-torture%2Fexecute%2Fstring-opt-13.c;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=3060f911ff3f00fc1ab10d1e3ffab80158db2340;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c deleted file mode 100644 index 3060f911..00000000 --- a/gcc/testsuite/gcc.c-torture/execute/string-opt-13.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 2001 Free Software Foundation. - - Ensure all builtin strlen comparisons against zero are optimized - and perform correctly. The multiple calls to strcpy are to prevent - the potentially "pure" strlen calls from being removed by CSE. - - Written by Roger Sayle, 11/02/2001. */ - -extern void abort (void); -typedef __SIZE_TYPE__ size_t; -extern size_t strlen (const char *); -extern char *strcpy (char *, const char *); - -int -main () -{ - char str[8]; - char *ptr; - - ptr = str; - strcpy (ptr, "nts"); - if (strlen (ptr) == 0) - abort (); - - strcpy (ptr, "nts"); - if (strlen (ptr) < 1) - abort (); - - strcpy (ptr, "nts"); - if (strlen (ptr) <= 0) - abort (); - - strcpy (ptr, "nts"); - if (strlen (ptr+3) != 0) - abort (); - - strcpy (ptr, "nts"); - if (strlen (ptr+3) > 0) - abort (); - - strcpy (ptr, "nts"); - if (strlen (str+3) >= 1) - abort (); - - return 0; -} - -#ifdef __OPTIMIZE__ -/* When optimizing, all the above cases should be transformed into - something else. So any remaining calls to the original function - should abort. */ -static size_t -strlen (const char *s) -{ - abort (); -} -#endif -