public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/101602] New: local and local_init are not supported in DO CONCURRENT
@ 2021-07-23 15:01 jeff.science at gmail dot com
  2021-11-06 19:53 ` [Bug fortran/101602] [F2018] " anlauf at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jeff.science at gmail dot com @ 2021-07-23 15:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101602
           Summary: local and local_init are not supported in DO
                    CONCURRENT
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jeff.science at gmail dot com
  Target Milestone: ---

Fortran 2018 (https://j3-fortran.org/doc/year/18/18-007r1.pdf) has three
locality specifiers: shared, local and local_init.

GCC Fortran does not support any of these.  This breaks user experience for
Fortran programmers using DO CONCURRENT code that works with other compilers.

OpenMP supports equivalent locality specifiers already so the internal
capability for this surely exists in GCC.

      program bug
        implicit none
        integer :: i, j, k
        integer, dimension(100) :: x
        j = 20
        k = 30
        x = 7
        do concurrent (i=1:10) shared(x)
           k = k + x(i)
           j = k 
        end do
        do concurrent (i=1:10) local(j)
           k = k + x(i)
           j = k 
        end do
        do concurrent (i=1:10) local_init(k)
           k = k + x(i)
           j = k 
        end do
        print*,k
      end program bug


% gfortran-11 bug.F
bug.F:8:31:

    8 |         do concurrent (i=1:10) shared(x)
      |                               1
Error: Syntax error in DO statement at (1)
bug.F:11:11:

   11 |         end do
      |           1
Error: Expecting END PROGRAM statement at (1)
bug.F:12:31:

   12 |         do concurrent (i=1:10) local(j)
      |                               1
Error: Syntax error in DO statement at (1)
bug.F:15:11:

   15 |         end do
      |           1
Error: Expecting END PROGRAM statement at (1)
bug.F:16:31:

   16 |         do concurrent (i=1:10) local_init(k)
      |                               1
Error: Syntax error in DO statement at (1)
bug.F:19:11:

   19 |         end do
      |           1
Error: Expecting END PROGRAM statement at (1)

% gfortran-11 --version
GNU Fortran (Homebrew GCC 11.1.0_1) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-16 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 15:01 [Bug fortran/101602] New: local and local_init are not supported in DO CONCURRENT jeff.science at gmail dot com
2021-11-06 19:53 ` [Bug fortran/101602] [F2018] " anlauf at gcc dot gnu.org
2023-08-14 20:12 ` marshall.ward at gmail dot com
2023-08-15  5:06 ` michael at dontknow dot de
2023-08-16 15:37 ` marshall.ward at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).