This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What does GFC_STD_F77 do?


> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]