]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/gcc.dg/complete-port.c
i * libgcc1-test.c, libgcc1.c, config/i386/perform.h: Delete file.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / complete-port.c
similarity index 58%
rename from gcc/libgcc1-test.c
rename to gcc/testsuite/gcc.dg/complete-port.c
index 67c7639deeac60a5b90f5b693abf5d9d9e3cd1d8..c8ebcc10e42b11ec0dea1caeb0b13895401bf274 100644 (file)
@@ -1,7 +1,7 @@
-/* This small function uses all the arithmetic operators that
-   libgcc1.c can handle.  If you can link it, then
-   you have provided replacements for all the libgcc1.c functions that
-   your target machine needs.  */
+/* This small program uses all the arithmetic operators that may
+   generate calls to library routines which must be implemented in
+   port-specific assembly language.  */
+/* { dg-do link } */
 
 #include <stddef.h>
 
@@ -10,11 +10,8 @@ double dfoo ();
 void discard (int);
 void ddiscard (double);
 
-/* We don't want __main here because that can drag in atexit (among other
-   things) which won't necessarily exist yet.  */
-
 int
-main_without__main ()
+main (void)
 {
   int a = foo (), b = foo ();
   unsigned int au = foo (), bu = foo ();
@@ -97,23 +94,3 @@ dfoo ()
 
   return table[idx++];
 }
-
-/* Provide functions that some versions of the linker use to default
-   the start address if -e symbol is not used, to avoid the warning
-   message saying the start address is defaulted.  */
-extern void start() __asm__("start");
-extern void _start() __asm__("_start");
-extern void __start() __asm__("__start");
-
-/* Provide functions that might be needed by soft-float emulation routines.  */
-void *memcpy(void *to,
-            const void *from __attribute__((__unused__)),
-            size_t len __attribute__((__unused__)))
-{
-  return to;
-}
-
-void start() {}
-void _start() {}
-void __start() {}
-void mainCRTStartup() {}