blob: 57446b263c9d1ab4e1de00711c350a9cb648c6c7 [file] [log] [blame]
extern void abort (void);
extern int abs_called;
extern int inside_main;
/* The labs call should have been optimized, but the abs call
shouldn't have been. */
int
abs (int x)
{
if (inside_main)
abs_called = 1;
return (x < 0 ? -x : x);
}
long
labs (long x)
{
if (inside_main)
abort ();
return (x < 0 ? -x : x);
}