From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e859f774bbb3dfb3 X-Google-Thread: 1094ba,40d8c5edfa36ea47 X-Google-Attributes: gid103376,gid1094ba,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail From: "James Giles" Newsgroups: comp.lang.ada,comp.lang.fortran References: <54157920-377a-441b-9b0b-f0c4f9ddffec@f36g2000hsa.googlegroups.com> <54435596-5e7f-4686-a2b7-1e22d7c4b186@p25g2000hsf.googlegroups.com> <_wPbk.7600$L_.4566@flpi150.ffdc.sbc.com> <1ijtbxq.1t7i71w700eykN%nospam@see.signature> Subject: Re: another way to shoot yourself in the foot? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Message-ID: Date: Thu, 10 Jul 2008 19:55:02 GMT NNTP-Posting-Host: 12.72.113.45 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1215719702 12.72.113.45 (Thu, 10 Jul 2008 19:55:02 GMT) NNTP-Posting-Date: Thu, 10 Jul 2008 19:55:02 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:1091 comp.lang.fortran:2598 Date: 2008-07-10T19:55:02+00:00 List-Id: Craig Powers wrote: > Dick Hendrickson wrote: >> Colin Paul Gloster wrote: >>> >>> Does Fortran always automatically check if the INTERFACE actually >>> corresponds to the code? >>> >> Depends on the compiler, but in general NO. I think all >> compilers will detect an explicit assignment to a dummy >> argument that has INTENT(IN) in the subroutine; I'm not sure >> any will detect an assignment if the dummy is passed on >> to another routine and that routine (illegally) assigns to >> its argument. > > Is that actually possible without lying about an interface? i.e. Is > it possible to pass an INTENT(IN) dummy as an actual argument to a > more permissive dummy argument in another routine (no intent or > intent OUT) It's not permitted. The standard doesn't require implementations to verify that it's not done. That is, it's not one of the kinds of error that the standard requires implementations to detect and report. -- J. Giles "I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." -- C. A. R. Hoare "Simplicity is prerequisite for reliability" -- E. W. Dijkstra