https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104621
Bug ID: 104621
Summary: [OpenMP] Issues with 'declare variant'
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: accepts-invalid, openmp
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
Target Milestone: ---
The following seems to be invalid - but is accepted:
program main
interface
subroutine foo
end subroutine
subroutine bar
end subroutine
end interface
!$omp declare variant (foo) &
!$omp & match (implementation={atomic_default_mem_order(seq_cst)})
end
Reason:
* Any declare variant directive must appear in the specification part of a
subroutine
subprogram, function subprogram, or interface body to which it applies.
* * *
The spec itself is odd regarding placing the 'declare variant' inside interface
block (but outside an interface body) – and the rules about the base-name are
also odd. I filled the OpenMP Spec Issue #3241 to track the spec issues.