This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/83064] DO CONCURRENT inconsistent results
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Nov 2017 13:16:04 +0000
- Subject: [Bug fortran/83064] DO CONCURRENT inconsistent results
- Auto-submitted: auto-generated
- References: <bug-83064-4@http.gcc.gnu.org/bugzilla/>
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.