* F77 4.0: Is this warning correct?
@ 1996-08-22 4:00 Rob Hooft
1996-08-23 4:00 ` Steve Lionel
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Rob Hooft @ 1996-08-22 4:00 UTC (permalink / raw)
I'm getting a strange warning from the F77 compiler V4.0. Is this
supposed to happen?
================================================
nu[124]~% f77 -warn argument_checking -c x.f
fort: Warning: x.f, line 10: Actual argument data type ( Unknown ) not equal to routine's dummy argument type ( Integer*4 ).
CALL ONE(S,LEN(S))
-----------------^
nu[125]~% cat x.f
SUBROUTINE ONE (S,L)
CHARACTER*(*) S
INTEGER L
DO I=1,L
S(I:I)=' '
END DO
END
SUBROUTINE TWO (S)
CHARACTER*(*) S
CALL ONE(S,LEN(S))
END
=================================================
Regards,
--
=== Rob.Hooft@EMBL-Heidelberg.DE http://www.Sander.EMBL-Heidelberg.DE/rob/ ==
==== In need of protein modeling? http://www.Sander.EMBL-Heidelberg.DE/whatif/
Validation of protein structures? http://biotech.EMBL-Heidelberg.DE:8400/ ====
== PGPid 0xFA19277D == Use Linux! Free Software Rules The World! =============
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: F77 4.0: Is this warning correct?
1996-08-22 4:00 F77 4.0: Is this warning correct? Rob Hooft
1996-08-23 4:00 ` Steve Lionel
@ 1996-08-23 4:00 ` Jack Patteeuw
1996-08-26 4:00 ` Steve Lionel
1996-08-23 4:00 ` Steve Lionel
1996-08-27 4:00 ` Allan E Johannesen
3 siblings, 1 reply; 8+ messages in thread
From: Jack Patteeuw @ 1996-08-23 4:00 UTC (permalink / raw)
In article <vzyivabiuet.fsf@nu.embl-heidelberg.de>, Rob Hooft <Rob.Hooft@embl-heidelberg.de> writes:
>I'm getting a strange warning from the F77 compiler V4.0. Is this
>supposed to happen?
>
>================================================
> f77 -warn argument_checking -c x.f
>fort: Warning: x.f, line 10: Actual argument data type ( Unknown ) not equal to routine's dummy argument type ( Integer*4 ).
> CALL ONE(S,LEN(S))
You may have found a bug here. Your code compiles cleanly on VMS and
the compiler should know that the LEN function does return Integer*4.
Jack Patteeuw
My opinions are my own and not my employer's, my wife's, or my children !
"I used to do VMS, Stolen from a good friend:
Now I do Unix; "A mind is like a parachute ...
It's a living" It only works when it is open !"
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: F77 4.0: Is this warning correct?
1996-08-22 4:00 F77 4.0: Is this warning correct? Rob Hooft
1996-08-23 4:00 ` Steve Lionel
1996-08-23 4:00 ` Jack Patteeuw
@ 1996-08-23 4:00 ` Steve Lionel
1996-08-27 4:00 ` Allan E Johannesen
3 siblings, 0 replies; 8+ messages in thread
From: Steve Lionel @ 1996-08-23 4:00 UTC (permalink / raw)
In article <vzyivabiuet.fsf@nu.embl-heidelberg.de>, Rob Hooft
<Rob.Hooft@embl-heidelberg.de> writes:
|>I'm getting a strange warning from the F77 compiler V4.0. Is this
|>supposed to happen?
|>
|>================================================
|>nu[124]~% f77 -warn argument_checking -c x.f
|>fort: Warning: x.f, line 10: Actual argument data type ( Unknown ) not equal
|>to routine's dummy argument type ( Integer*4 ).
|> CALL ONE(S,LEN(S))
No, it is not supposed to happen. This got triggered by our "promoting"
the type of LEN() to be INTEGER*8, but clearly something went wrong in
the process. We'll fix it.
If you find other problems with Digital Fortran, please report them through
your Digital software support center or send mail to fortran@digital.com.
That way we'll be guaranteed to see it - asking in the newsgroup runs the
risk of us missing the question.
--
Steve Lionel mailto:lionel@quark.zko.dec.com
Fortran Development http://www.digital.com/info/slionel.html
Digital Equipment Corporation
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: F77 4.0: Is this warning correct?
1996-08-22 4:00 F77 4.0: Is this warning correct? Rob Hooft
@ 1996-08-23 4:00 ` Steve Lionel
1996-08-27 4:00 ` Clive Page
1996-08-23 4:00 ` Jack Patteeuw
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Steve Lionel @ 1996-08-23 4:00 UTC (permalink / raw)
In article <vzyivabiuet.fsf@nu.embl-heidelberg.de>, Rob Hooft
<Rob.Hooft@embl-heidelberg.de> writes:
|>nu[124]~% f77 -warn argument_checking -c x.f
|>fort: Warning: x.f, line 10: Actual argument data type ( Unknown ) not equal
|>to routine's dummy argument type ( Integer*4 ).
|> CALL ONE(S,LEN(S))
A follow-up note. The existence of the warning is correct - LEN is documented
as returning an INTEGER*8 and therefore it's a mismatch with an INTEGER*4
dummy argument. The bug is in the "Unknown" text of the message - and that
we'll fix.
--
Steve Lionel mailto:lionel@quark.zko.dec.com
Fortran Development http://www.digital.com/info/slionel.html
Digital Equipment Corporation
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: F77 4.0: Is this warning correct?
1996-08-23 4:00 ` Jack Patteeuw
@ 1996-08-26 4:00 ` Steve Lionel
0 siblings, 0 replies; 8+ messages in thread
From: Steve Lionel @ 1996-08-26 4:00 UTC (permalink / raw)
In article <4vki6o$c0@pt9201.ped.pto.ford.com>, patteeuw@sys2.ped.pto.ford.com
(Jack Patteeuw) writes:
|>> f77 -warn argument_checking -c x.f
|>>fort: Warning: x.f, line 10: Actual argument data type ( Unknown ) not equal
|>to routine's dummy argument type ( Integer*4 ).
|>> CALL ONE(S,LEN(S))
|>
|>You may have found a bug here. Your code compiles cleanly on VMS and
|>the compiler should know that the LEN function does return Integer*4.
As I mentioned in my earlier posting, the only bug is the "Unknown" in the
message. LEN returns INTEGER*8 in the current version (4.0 on UNIX, 7.0
on VMS.) You'll get the same message using 7.0 on OpenVMS Alpha. (The VAX
compiler doesn't have /WARN=ARGUMENT_CHECKING).
--
Steve Lionel mailto:lionel@quark.zko.dec.com
Fortran Development http://www.digital.com/info/slionel.html
Digital Equipment Corporation
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: F77 4.0: Is this warning correct?
1996-08-23 4:00 ` Steve Lionel
@ 1996-08-27 4:00 ` Clive Page
1996-08-28 4:00 ` Steve Lionel
0 siblings, 1 reply; 8+ messages in thread
From: Clive Page @ 1996-08-27 4:00 UTC (permalink / raw)
In article <4vkung$f3d@nntpd.lkg.dec.com>,
Steve Lionel <lionel@quark.zko.dec.com> wrote:
>A follow-up note. The existence of the warning is correct - LEN is documented
>as returning an INTEGER*8 and therefore it's a mismatch with an INTEGER*4
>dummy argument. The bug is in the "Unknown" text of the message - and that
>we'll fix.
Um, could you explain why LEN returns INTEGER*8? And isn't that
inconsistent with the Fortran Standard, which surely specifies that LEN is
to return a "default" integer?
--
-------------------------------------------------------------------------
Clive Page, Internet: cgp@star.le.ac.uk
Dept of Physics & Astronomy,
University of Leicester.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: F77 4.0: Is this warning correct?
1996-08-22 4:00 F77 4.0: Is this warning correct? Rob Hooft
` (2 preceding siblings ...)
1996-08-23 4:00 ` Steve Lionel
@ 1996-08-27 4:00 ` Allan E Johannesen
3 siblings, 0 replies; 8+ messages in thread
From: Allan E Johannesen @ 1996-08-27 4:00 UTC (permalink / raw)
Clive Page <cgp@le.ac.uk> writes:
> Um, could you explain why LEN returns INTEGER*8? And isn't that
> inconsistent with the Fortran Standard, which surely specifies that LEN is
> to return a "default" integer?
The ancient X3.9-1978 standard does say that LEN returns INTEGER, but there's
no point in devloping a 64 bit machine if you can't use it... If one had to
write LONGLEN(string) on Digital UNIX to deal with potentially long strings,
maybe reserving LEN for "short" ones, then you wouldn't have a transportable
program.
I don't have a newer reference on my shelf.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: F77 4.0: Is this warning correct?
1996-08-27 4:00 ` Clive Page
@ 1996-08-28 4:00 ` Steve Lionel
0 siblings, 0 replies; 8+ messages in thread
From: Steve Lionel @ 1996-08-28 4:00 UTC (permalink / raw)
In article <4vuq0e$632@hawk.le.ac.uk>, Clive Page <cgp@le.ac.uk> writes:
|>Um, could you explain why LEN returns INTEGER*8? And isn't that
|>inconsistent with the Fortran Standard, which surely specifies that LEN is
|>to return a "default" integer?
The Fortran 77 standard just says "integer", since there is only one integer
type. The Fortran 90 standard does say "default integer". We chose to
deviate from the standard here because it seemed the right thing to do, with
our support of objects whose size exceeds 32 bits. It's difficult to write a
meaningful standard-conforming program that can tell the difference (I haven't
yet thought of a way to write even a non-meaningful F77 program that could).
The larger return size shouldn't make an operational difference in an
application.
--
Steve Lionel mailto:lionel@quark.zko.dec.com
Fortran Development http://www.digital.com/info/slionel.html
Digital Equipment Corporation
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For information on Digital Fortran, see http://www.digital.com/info/hpc/fortran/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1996-08-28 4:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-22 4:00 F77 4.0: Is this warning correct? Rob Hooft
1996-08-23 4:00 ` Steve Lionel
1996-08-27 4:00 ` Clive Page
1996-08-28 4:00 ` Steve Lionel
1996-08-23 4:00 ` Jack Patteeuw
1996-08-26 4:00 ` Steve Lionel
1996-08-23 4:00 ` Steve Lionel
1996-08-27 4:00 ` Allan E Johannesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox