On Fri, May 17, 2019 at 10:33:30PM +0300, Janne Blomqvist wrote:
> I don't think it's this simple, unfortunately. If it would be only R,
> then yes, we could help the R people fix their code and then it would
> all be done. But seems this is everywhere. It's in CBLAS & LAPACKE
> (the official BLAS and LAPACK C interfaces), it's in numpy (probably
> scipy also), R, arma. And BLAS/LAPACK are pretty central, and probably
> the single biggest reason why non-Fortran programmers use Fortran
> code. And while the issue has been known, it seems to have been
> happily ignored for the past 30 years.
> 
> And yes, while I think one year might be a quite optimistic timeframe
> to get this fixed, I agree we shouldn't keep the workaround
> indefinitely either. I think the best way would be if CBLAS & LAPACKE
> would be fixed, and then we could tell people to use those rather than
> their own in-house broken interfaces.

Could we easily detect at resolve time whether a subroutine/function
makes any implicitly prototyped calls and limit this workaround to those
cases (i.e. only old-style Fortran)?  I've mentioned it in the PR, but not
sure how exactly to check that.
The thing is, if all calls are explicitly prototyped, then we've been using
tail calls before as well and so the workaround would just pessimize
something we've been optimizing fine before.

        Jakub

Reply via email to