X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fgcc.c-torture%2Fexecute%2Fbuiltin-noret-1.c;fp=gcc%2Ftestsuite%2Fgcc.c-torture%2Fexecute%2Fbuiltin-noret-1.c;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=cfd78991214ee6bc90bc0b958d80a777f6a68f49;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c b/gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c deleted file mode 100644 index cfd78991..00000000 --- a/gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Test for builtin noreturn attributes. */ -/* Origin: Joseph Myers */ - -extern void abort (void); -extern void exit (int); -#if 0 /* Doesn't work with prototype (bug?). */ -extern void _exit (int); -extern void _Exit (int); -#endif - -extern void tabort (void); -extern void texit (void); -extern void t_exit (void); -extern void t_Exit (void); - -extern void link_failure (void); - -int -main (void) -{ - volatile int i = 0; - /* The real test here is that the program links. */ - if (i) - tabort (); - if (i) - texit (); - if (i) - t_exit (); - if (i) - t_Exit (); - exit (0); -} - -void -tabort (void) -{ - abort (); - link_failure (); -} - -void -texit (void) -{ - exit (1); - link_failure (); -} - -void -t_exit (void) -{ - _exit (1); - link_failure (); -} - -/* Some non-Unix libcs might not have _exit. This version should never - get called. */ -static void -_exit (int i) -{ - abort (); -} - -void -t_Exit (void) -{ - _Exit (1); - link_failure (); -} - -/* Some libcs might not have _Exit. This version should never get called. */ -static void -_Exit (int i) -{ - abort (); -} - -/* When optimizing, no calls to link_failure should remain. In any case, - link_failure should not be called. */ - -#ifndef __OPTIMIZE__ -void -link_failure (void) -{ - abort (); -} -#endif