X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fgcc.c-torture%2Fexecute%2Fstring-opt-16.c;fp=gcc%2Ftestsuite%2Fgcc.c-torture%2Fexecute%2Fstring-opt-16.c;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=a28cdb04271d7fe50e36fbc5c66af4589a888397;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c b/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c deleted file mode 100644 index a28cdb04..00000000 --- a/gcc/testsuite/gcc.c-torture/execute/string-opt-16.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 2001 Free Software Foundation. - - Ensure that builtin memcmp operations when all three arguments - are constant is optimized and performs correctly. Taken from - PR optimize/3508. - - Written by Roger Sayle, 12/26/2001. */ - -extern void abort (void); -extern void link_error (void); - -typedef __SIZE_TYPE__ size_t; -extern int memcmp (const void *, const void *, size_t); - -int -main (int argc) -{ - if (memcmp ("abcd", "efgh", 4) >= 0) - link_error (); - if (memcmp ("abcd", "abcd", 4) != 0) - link_error (); - if (memcmp ("efgh", "abcd", 4) <= 0) - link_error (); - 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 int -memcmp (const void *s1, const void *s2, size_t len) -{ - abort (); -} -#else -/* When not optimizing, the above tests may generate references to - the function link_error, but should never actually call it. */ -static void -link_error () -{ - abort (); -} -#endif -