[gnu.gcc.bug] inlining bug...

lewie@rvl3.ecn.purdue.edu (Jeff Lewis) (11/17/89)

Machine: Sun4os4
Gcc: 1.36

In the following program, the 'inline' declaration appears to cause the
type of the function to become lost.  The second printf()'s output is
bogus because dosqrt2()'s return value is interpreted as 'int'.

#include <math.h>

static double
dosqrt1(r)
double r;

{
    return sqrt(r);
}

static inline double
dosqrt2(r)
double r;

{
    return sqrt(r);
}

main()

{
    printf("%g\n", dosqrt1(2.0));
    printf("%g\n", dosqrt2(2.0));
}