This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add NON_RECURSIVE attribute for procedures
- From: Thomas Koenig <tkoenig at netcologne dot de>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 22 Dec 2017 13:13:40 +0100
- Subject: Re: [PATCH] Add NON_RECURSIVE attribute for procedures
- Authentication-results: sourceware.org; auth=none
- References: <1513712893-340-1-git-send-email-blomqvist.janne@gmail.com> <a7784fc9-1efc-fd6a-b1a6-1c3493872aa7@netcologne.de> <CAO9iq9F4qKhA+YDZ8hwsL1Ru1ZsOpM5t9JX18=EZ9pNNtRa7Nw@mail.gmail.com>
Hi Janne,
I think, in general, our current system where
-std=gnu means roughly "everything we have implemented so far, except
legacy extensions that break standards conformance" is pretty good.
The problem that I see with implementing this change is stack space,
especially the traditionally limited stack space on some systems with
OpenMP.
We have already seen a few bug reports for this, with the large buffer
that the blocked library version of matmul uses.
If we implement that patch "as is", we will blow up a lot of existing
codes. One problem is that the error messages are bad (segfault)
to mysterious (something that has no apparent relation to the root
cause).
> Now, to play devils advocate with my own patch, one can make the case
> that before making procedures recursive by default we should fix
> -frecursive / -fmax-stack-var-size so that it's robust in the face of
> recursion (and multi-threaded access) and also prevents blowing up the
> stack.
Yes, I think we need to do this.
Regards
Thomas