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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx08.am4.POSTED!not-for-mail Newsgroups: comp.lang.ada X-Mozilla-News-Host: news://news.virginmedia.com:119 From: Chris M Moore Subject: Making the same mistake as the broken C interface to fortran User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Message-ID: X-Complaints-To: http://netreport.virginmedia.com NNTP-Posting-Date: Mon, 24 Jun 2019 23:33:39 UTC Organization: virginmedia.com Date: Tue, 25 Jun 2019 00:33:39 +0100 X-Received-Bytes: 1505 X-Received-Body-CRC: 1216123151 Xref: reader01.eternal-september.org comp.lang.ada:56741 Date: 2019-06-25T00:33:39+01:00 List-Id: Hi, Read this interesting article today: https://lwn.net/SubscriberLink/791393/41d57555202e8cdb/ Synopsis: C interfaces to Fortran makes some assumptions about how to call fortran ABIs (I don't need to pass the hidden length parameter if its a character*1) but now Gfortran has optimisations which assume a different calling convention (Thou shalt pass the hidden length). There are work arounds (compile fortran with ‑fno‑optimize‑sibling‑calls) but it seems that the proper fix is to pass the hidden length parameter. I had a quick look at the LAPACK bindings and they both seem to use Ada characters. :/ -- sig pending (since 1995)