This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/83064] DO CONCURRENT inconsistent results


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83064

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
As I said in the other bug we're seeing

       real(real64), dimension(nsplit) :: tmp

as "shared" amongst the outer loop iterations.

It seems it is constructed that way by the frontend though:

MAIN__ ()
{
...
  real(kind=8) A.11[4];
...
  atmp.10.dtype = 537;
  atmp.10.dim[0].stride = 1;
  atmp.10.dim[0].lbound = 0;
  atmp.10.dim[0].ubound = 3;
  atmp.10.data = &A.11;
  atmp.10.offset = 0;
  compute (&atmp.10, _73, _74); [static-chain: &FRAME.22]

and

compute (struct array1_real(kind=8) & __result, integer(kind=8) & restrict low,
integer(kind=8) & restrict high)
{
  real(kind=8)[0:D.3540] * restrict __result.0;

so each invocation gets the same local array in MAIN__.

Not sure if you need to mark compute somehow to avoid this and the testcase
is invalid fortran or if the frontend is at fault.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]