Add an UNSPEC_PROLOGUE_USE to prevent the link register from being considered dead.
[official-gcc.git] / libf2c / libF77 / s_stop.c
blob571416be7bbf8c1a16c42dedb507f1125080aa77
1 #include <stdio.h>
2 #include "f2c.h"
4 #undef abs
5 #undef min
6 #undef max
7 #include <stdlib.h>
8 void f_exit (void);
10 int
11 s_stop (char *s, ftnlen n)
13 int i;
15 if (n > 0)
17 fprintf (stderr, "STOP ");
18 for (i = 0; i < n; ++i)
19 putc (*s++, stderr);
20 fprintf (stderr, " statement executed\n");
22 #ifdef NO_ONEXIT
23 f_exit ();
24 #endif
25 exit (0);
27 /* We cannot avoid (useless) compiler diagnostics here: */
28 /* some compilers complain if there is no return statement, */
29 /* and others complain that this one cannot be reached. */
31 return 0; /* NOT REACHED */