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

            Bug ID: 129067
           Summary: [OpenMP] Missing diagnostic for incomplete
                    'defaultmap'
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic, openmp
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

The following program is obviously incomplete – BUT silently ACCEPTED!

VARIANT 1 – tailing ':' without '<classification> )':

  !$omp target defaultmap(firstprivate : aggregate) defaultmap(tofrom : scalar)
defaultmap(present : pointer) defaultmap(alloc: 
  !$omp end target
end


VARIANT 2 – missing ')' or ':':

  !$omp target defaultmap(firstprivate : aggregate) defaultmap(tofrom : scalar)
defaultmap(present : pointer) defaultmap(alloc
  !$omp end target
end


For the first one, an error is printed when adding any character after the ':'

  Error: Expected SCALAR, AGGREGATE, ALLOCATABLE, POINTER or ALL

but not if there is just a tailing ':'.

Reply via email to