What does GFC_STD_F77 do?
Paul Brook
paul@codesourcery.com
Sat Jan 29 19:22:00 GMT 2005
> > troutmask:sgk[203] gfc -o d -std=f95 d.f
> > In file d.f:7
> >
> > z8 = cos(z8)
> > 1
> > Error: Type of argument 'x' in call to 'cos' at (1) should be REAL(4),
> > not COMPLEX(8) troutmask:sgk[204] gfc -o d -std=gnu d.f
> >
> > This is clearly not good.
>
> Hmm, whether that is a real bug or only a case of being overly anal
> can be debated. ;-)
F95 defines cos for all real and complex types. There's some leeway in how
these are implemented ("processor dependend approximation"), but i don't see
how the above error could be anything but a bug. The error message above
should should be fixed by my recent patch.
What F95 doesn't define is the "DOUBLE COMPLEX" type, and the corresponding
specific names eg. zcos.
We currently accept "DOUBLE COMPLEX z" when --std=f95. That is a bug.
> AFAIK, F95 does not define sqrt for complex
> arguments (it's a G77 extension), so technically it's correct to
> abort. Whether it's practical and reasonable is another question.
F95 defines sqrt for both complex and real types.
Paul
More information about the Fortran
mailing list