Re: [patch, fortran] Emit error for recursive I/O

Jerry D <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
On 1/4/26 11:23 AM, Thomas Koenig wrote:
> Hello world,
> 
> the attached patch hijacks Jerry's version and adds logic which
> should make everything thread-safe. (Jerry, I hope you don't mind
> this).
> 
> The rest is in the ChangeLog and in the comments.
> 
> OK for trunk?
> 
> Best regards
> 
>      Thomas
> 
> Generate a runtime error on recursive I/O, thread-safe
> 
> This patch is a version of Jerry's patch with one additional feature.
> When locking a unit, the thread ID of the locking thread also stored
> in the gfc_unit structure. When the unit is found to be locked, it can
> be either have been locked by the same thread (bad, recursive I/O) or
> by another thread (harmless).
> 
> Regression-tested fully (make -j8 check in the gcc build directory) on
> Linux, which links in pthreads by default.  Steve checked on FreeBSD,
> which does not do so.
> 
> OK for trunk?

Hi Thomas,

This looks good on my end. OK for trunk.

Thanks for stepping in. Good teamwork.

Jerry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.