On Sat, Apr 24, 2021 at 12:49:45PM +0200, Andre Vehreschild wrote: > Hi Steve, hi all, > > thank you for pointing that out, Steve. When I started the work, I told > myself, that I have to remember to add your patch to the submit. Well, that > did > not last for more than eight hours and I had forgotten. > > So here is now the combination of Steve's and my patch (attached). > > Bootstrapped and regtested ok on x86_64/f33. > > @Steve: Is this your correct mail address for the changelog or do you prefer a > different one? > > Regards, > Andre > > Changelog: > > Steve Kargl <s...@troutmask.apl.washington.edu> > > PR fortran/98301 - random_init() is broken > > Correct implementation of random_init() when -fcoarray=lib is given. > > gcc/fortran/ChangeLog: > > PR fortran/98301 > * trans-decl.c (gfc_build_builtin_function_decls): Move decl. > * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for > lib-call of caf_random_init instead of logical (4-byte). > * trans.h: Add tree var for random_init. > > libgfortran/ChangeLog: > > PR fortran/98301 > * caf/libcaf.h (_gfortran_caf_random_init): New function. > * caf/single.c (_gfortran_caf_random_init): New function. > * gfortran.map: Added fndecl. > * intrinsics/random_init.f90: Implement random_init. >
Andre, The patch looks fine to me. I wonder, however, if we should comment out all of the shared memory stuff, i.e., the _cas_ stuff. I don't know when Thomas/Nicolas will merge their work-in-progress. -- steve