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

            Bug ID: 87648
           Summary: Clobber some variables on entry to DO CONCURRENT
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

For variables which are defined in a DO CONCURRENT loop,
it should be beneficial to clobber them on entry.

This could have two benefits: Catching undefined variables for
constructs like

        do concurrent (i = 1:size(a))
            s = s + (2 * a(i) - 1)
        end do

but not for things like

       do concurrent (i = 1:size(a))
            if (i == 42) s = (2 * a(i) - 1)
       end do

and possibly as an aid to optimization.

For some analysis, see

https://groups.google.com/d/msg/comp.lang.fortran/ksGzUPK7GBM/ulfEBGFkBQAJ

Reply via email to