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

            Bug ID: 122369
           Summary: [OpenMP] Labels mishandled with METADIRECTIVE (bogus:
                    "label ... not defined")
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: openmp, rejects-valid
          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 fails - when metadirectives are enabled - with
the puzzling diagnostic: Label 366 unused + label 366 not defined.

That's a reduced example from SPECaccel v2021's 463.swim.

!------------------------------------------

! FAILING -> !$omp metadirective
!   Warning: Label 366 at (1) defined but not used [-Wunused-label]
!   Error: FORMAT label 366 at (1) not defined
! OK -> !$omp target teams distribute parallel do

!$omp  metadirective when(user={condition(.true.)}: target teams  &
!$omp&        distribute parallel do)  
      DO JCHECK = 1, MNMIN
      END DO
      WRITE(6,366) PCHECK, UCHECK, VCHECK
 366  FORMAT(/, ' Vcheck = ',E12.4,/)
      END PROGRAM

Reply via email to