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

            Bug ID: 109999
           Summary: [OpenMP] Bogus error message: talks about '"#pragma
                    omp" clause' instead of '"target" clause
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: diagnostic, openmp
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

I just spotted with gcc and g++; IMHO the error message is
misleading/wrong/odd, however, it does not seem to be a regression.

Namely I get:

tests/5.0/allocate/test_allocate_on_device.c:27:43:
error: expected ‘#pragma omp’ clause before ‘uses_allocators’
   27 | #pragma omp target map(tofrom: errors, A)
uses_allocators(omp_default_mem_alloc)
      |                                           ^~~~~~~~~~~~~~~


EXPECTED: instead of "expected '#pragma omp' clause"
it should be show:   "expected 'target' clause".

Found when compiling:
g++ --free-line-length-none -fopenmp -I ompvv
tests/5.0/allocate/test_allocate_on_device.c

which is part of https://github.com/SOLLVE/sollve_vv

Reply via email to