Observed issues › fuzz/s1-6760-cce20
Appears not to supportRefused at compile time · Fortran · OpenMP · Fixed in 21.0.3
ftn rejects the enter clause of declare target (the OpenMP 5.2 name of the to clause)
Legality: independently confirmed. 2 independent readings find the program legal and the result required. How this is checked
Affected variants
| Compiler | MI300A gfx942 unified memory (XNACK 1) | MI300A gfx942 copy (XNACK 0) | MI250X gfx90a copy (XNACK 0) | MI300X gfx942 copy (XNACK 0) | MI350X gfx950 copy (XNACK 0) | A100 sm_80 separate memory | A100 sm_80 managed memory |
|---|---|---|---|---|---|---|---|
| AFAR 24.3.0 | correct | correct | correct | correct | correct | n/a | n/a |
| CCE 19.0.0 | not supported | not supported | not supported | unknown not run | unknown not run | n/a | n/a |
| CCE 20.0.2 | not supported | not supported | not supported | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.3 | correct | correct | correct | unknown not run | unknown not run | n/a | n/a |
| CCE 21.0.4 | correct | correct | correct | unknown not run | unknown not run | n/a | n/a |
| NVHPC 25.11 | n/a | n/a | n/a | n/a | n/a | fails another way | fails another way |
| NVHPC 26.9 | n/a | n/a | n/a | n/a | n/a | fails another way | fails another way |
| GCC 16.2.0 | correct | correct | correct | correct | correct | correct | n/a |
"behaves incorrectly" / "not supported": this issue, confirmed in up to four environments (another build directory, another node, a repeat). "fails another way": a different failure, not counted as this issue. "unknown": not run there, or the runs disagree.
Messages
| Result | Compiler and GPU | Message |
|---|---|---|
| not supported | CCE 19.0.0, MI300A unified CCE 19.0.0, MI300A copy CCE 19.0.0, MI250X | showWarning:
Headers and libraries from cray-libsci/25.03.0 will be ignored because depends on PE_MPICH which is unavailable..
module m
^
ftn-855 ftn: ERROR M, File = s1-6760-cce20.f90, Line = 1, Column = 8
The compiler has detected errors in module "M". No module information file will be created for this module.
!$omp declare target enter(g)
^ |
| not supported | CCE 20.0.2, MI300A unified CCE 20.0.2, MI300A copy CCE 20.0.2, MI250X | showWarning:
Headers and libraries from cray-libsci/25.09.0 will be ignored because depends on PE_MPICH which is unavailable..
module m
^
ftn-855 ftn: ERROR M, File = s1-6760-cce20.f90, Line = 1, Column = 8
The compiler has detected errors in module "M". No module information file will be created for this module.
!$omp declare target enter(g)
^ |
| fails another way | NVHPC 25.11, A100 separate NVHPC 25.11, A100 managed NVHPC 26.9, A100 separate NVHPC 26.9, A100 managed | showNVFORTRAN-S-0034-Syntax error at or near identifier enter (s1-6760-cce20.f90: 5) 0 inform, 0 warnings, 1 severes, 0 fatal for m NVFORTRAN-S-0072-Assignment operation illegal to external procedure g (s1-6760-cce20.f90: 14) NVFORTRAN-S-0038-Symbol, g, has not been explicitly declared (s1-6760-cce20.f90: 17) NVFORTRAN-S-0076-Subscripts specified for non-array variable g (s1-6760-cce20.f90: 20) 0 inform, 0 warnings, 3 severes, 0 fatal for p |
Reproduce
CCE 19.0.0, MI300A unified
module load cce/19.0.0 craype-accel-amd-gfx942 rocm/6.4.3 module unload cray-mpich ftn -fopenmp -O2 repro.f90 -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
CCE 20.0.2, MI300A unified
module load cce/20.0.2 craype-accel-amd-gfx942 rocm/6.4.3 module unload cray-mpich ftn -fopenmp -O2 repro.f90 -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
AFAR 24.3.0, MI300A unified (runs correctly)
$AFAR/bin/amdflang -fopenmp --offload-arch=gfx942 -O2 repro.f90 -o repro HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro
Program (60 lines)
! Finding: CCE 20 rejects the enter clause of declare
! target (ftn-1725 "Unexpected syntax while parsing the DIRECTIVE statement :
! "INDIRECT, LINK, TO or DEVICE_TYPE" was expected but found "E"").
!
! Legal OpenMP 5.2: enter is the 5.2 name of the declare target clause that
! 5.0/5.1 spell to ("The clause-name to may be used as a synonym for the
! clause-name enter. This use has been deprecated.", 5.2 §5.8.4 p.158; "The
! enter clause was added as a synonym for the to clause on the declare
! target directive", 5.2 Appendix B.2 p.627). CCE 20 claims it: the CCE
! 20.0.0 release notes list "[5.2] ... misc. new syntax allowed by
! specification (e.g. `declare target`, `ordered`, metadirective)", and
! the only new 5.2 syntax of declare target is enter (catalog/omp/
! claims.yaml; maintainer reading). A claimed form
! rejected: compiler_bug. CCE 19 makes no such claim (its identical
! rejection is unsupported, rule R11c); CCE 21 claims enter (Fortran) and
! accepts it.
!
! Observed (tuolumne, MI300A, -O2, HSA_XNACK=1 and 0, 2026-10-23,
! results/t28_probe/dt_enter.f90.*.json): CCE 20.0.2 ftn-1725 at the enter
! keyword (dt_enter.f90 line 13, column 24); CCE 19.0.0 the same
! (unsupported, no claim); CCE 21.0.3 and AFAR amdflang 24.0.0git compile
! it and print "RESULT check=pass" in both modes. Tioga MI250X (gfx90a):
! the catalog program omp52-clause-enter is rejected the same way by
! cce20_g90 (results/confirm/batch_full.jsonl, R11).
! Fuzz campaign s1: CCE 20's 7,099 enter rejections (s1 and s1x0; 5,588
! s1 programs use enter) are compiler_bug: 4,502 by rule R11 (another
! family compiles the program) and 2,597 by decision D9 (the other
! families reject the program at other statements). Representative: s1
! seed 6760 (116 lines, AFAR and CCE 21 print the model value); this
! reproducer is written by hand (data/evidence/dataenv_probe/dt_enter.f90).
! Expected: "RESULT check=pass".
!
! ftn -fopenmp -O2 (cce20 recipe, offload/engine/toolchains.py)
module m
implicit none
integer, parameter :: n = 16
integer :: g(n) = 1
!$omp declare target enter(g)
end module m
program p
use m
implicit none
integer :: i
logical :: ok
!$omp target
do i = 1, n
g(i) = g(i) + i
end do
!$omp end target
!$omp target update from(g)
ok = .true.
do i = 1, n
ok = ok .and. g(i) == 1 + i
end do
if (ok) then
print '(a)', 'RESULT check=pass'
else
print '(a)', 'RESULT check=fail'
end if
end program p
Something to add? Dispute its legality · Report it fixed in a newer release · Report a mistake on this page
Expected and observed
Expected
RESULT check=pass
Observed where it behaves incorrectly
Warning:
Headers and libraries from cray-libsci/25.03.0 will be ignored because depends on PE_MPICH which is unavailable..
module m
^
ftn-855 ftn: ERROR M, File = s1-6760-cce20.f90, Line = 1, Column = 8
The compiler has detected errors in module "M". No module information file will be created for this module.
!$omp declare target enter(g)
^ What the specification requires
The specification text this program relies on and the compiler is expected to support.
OpenMP 5.2 §5.8.4 p.158
The clause-name to may be used as a synonym for the clause-name enter. This use has been deprecated.
Evidence
Same compiler, one change
- declare target to(g), the deprecated spelling, instead of enter(g): AFAR 24.3.0: correct; CCE 19.0.0: correct; CCE 20.0.2: correct; CCE 21.0.3: correct; CCE 21.0.4: correct
Control program
module m implicit none integer, parameter :: n = 16 integer :: g(n) = 1 !$omp declare target to(g) end module m program p use m implicit none integer :: i logical :: ok !$omp target do i = 1, n g(i) = g(i) + i end do !$omp end target !$omp target update from(g) ok = .true. do i = 1, n ok = ok .and. g(i) == 1 + i end do if (ok) then print '(a)', 'RESULT check=pass' else print '(a)', 'RESULT check=fail' end if end program p
Other compilers run it correctly
AFAR 24.3.0, GCC 16.2.0