OffTarget

Observed issues › fuzz/s1-8634-cce21

Appears to behave incorrectlyCompiler crash · Fortran · OpenMP · Open

ftn: internal compiler error (optcg signal 11) for a character scalar in target enter data / exit data

Legality: independently confirmed. 2 independent readings find the program legal and the result required. How this is checked

Affected variants

CompilerMI300A 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.0correctcorrectcorrectcorrectcorrectn/an/a
CCE 19.0.0behaves incorrectlybehaves incorrectlybehaves incorrectlyunknown
not run
unknown
not run
n/an/a
CCE 20.0.2behaves incorrectlybehaves incorrectlybehaves incorrectlyunknown
not run
unknown
not run
n/an/a
CCE 21.0.3behaves incorrectlybehaves incorrectlybehaves incorrectlyunknown
not run
unknown
not run
n/an/a
CCE 21.0.4behaves incorrectlybehaves incorrectlybehaves incorrectlyunknown
not run
unknown
not run
n/an/a
NVHPC 25.11n/an/an/an/an/acorrectcorrect
NVHPC 26.9n/an/an/an/an/acorrectcorrect
GCC 16.2.0correctcorrectcorrectcorrectcorrectcorrectn/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

ResultCompiler and GPUMessage
behaves incorrectlyCCE 19.0.0, MI300A unified
CCE 19.0.0, MI300A copy
CCE 19.0.0, MI250X
show
Warning:
 Headers and libraries from cray-libsci/25.03.0 will be ignored because depends on PE_MPICH which is unavailable..
 #0 0x0000000001763747 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0x1763747)
 #1 0x000000000176063b SignalHandler(int) (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0x176063b)
 #2 0x000015555511698f (/lib64/libpthread.so.0+0x1298f)
 #3 0x0000000000ad1034 check_data_clauses_for_pgas() (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0xad1034)
 #4 0x0000000000b0e823 initial_mt_processing() (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0xb0e823)
 #5 0x000000000094fea5 void run_pass_helper<void>::exec<void (&)()>(int, char const*, void (&)()) (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0x94fea5)
behaves incorrectlyCCE 20.0.2, MI300A unified
CCE 20.0.2, MI300A copy
CCE 20.0.2, MI250X
show
Warning:
 Headers and libraries from cray-libsci/25.09.0 will be ignored because depends on PE_MPICH which is unavailable..
 #0 0x000000000154f4c7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/cray/pe/cce/20.0.2/cce/x86_64/bin/optcg+0x154f4c7)
 #1 0x000000000154c7f3 SignalHandler(int) (/opt/cray/pe/cce/20.0.2/cce/x86_64/bin/optcg+0x154c7f3)
 #2 0x000015555511698f (/lib64/libpthread.so.0+0x1298f)
 #3 0x00000000008d0d14 check_data_clauses_for_pgas() (/opt/cray/pe/cce/20.0.2/cce/x86_64/bin/optcg+0x8d0d14)
 #4 0x00000000009116b9 initial_mt_processing() (/opt/cray/pe/cce/20.0.2/cce/x86_64/bin/optcg+0x9116b9)
 #5 0x00000000007479e5 void run_pass_helper<void>::exec<void (&)()>(int, char const*, void (&)()) (/opt/cray/pe/cce/20.0.2/cce/x86_64/bin/optcg+0x7479e5)
behaves incorrectlyCCE 21.0.3, MI300A unified
CCE 21.0.3, MI300A copy
CCE 21.0.3, MI250X
show
Warning:
 Headers and libraries from cray-libsci/26.03.0 will be ignored because depends on PE_MPICH which is unavailable..
 #0 0x0000000001577407 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/cray/pe/cce/21.0.3/cce/x86_64/bin/optcg+0x1577407)
 #1 0x00000000015742b4 SignalHandler(int, siginfo_t*, void*) (/opt/cray/pe/cce/21.0.3/cce/x86_64/bin/optcg+0x15742b4)
 #2 0x000015555511698f (/lib64/libpthread.so.0+0x1298f)
 #3 0x00000000008aece4 check_data_clauses_for_pgas() (/opt/cray/pe/cce/21.0.3/cce/x86_64/bin/optcg+0x8aece4)
 #4 0x00000000008f94c0 initial_mt_processing() (/opt/cray/pe/cce/21.0.3/cce/x86_64/bin/optcg+0x8f94c0)
 #5 0x000000000071f0a5 void run_pass_helper<void>::exec<void (&)()>(int, char const*, void (&)()) (/opt/cray/pe/cce/21.0.3/cce/x86_64/bin/optcg+0x71f0a5)
behaves incorrectlyCCE 21.0.4, MI300A unified
CCE 21.0.4, MI300A copy
CCE 21.0.4, MI250X
show
Warning:
 Headers and libraries from cray-libsci/26.03.0 will be ignored because depends on PE_MPICH which is unavailable..
 #0 0x00000000015773d7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/cray/pe/cce/21.0.4/cce/x86_64/bin/optcg+0x15773d7)
 #1 0x0000000001574284 SignalHandler(int, siginfo_t*, void*) (/opt/cray/pe/cce/21.0.4/cce/x86_64/bin/optcg+0x1574284)
 #2 0x000015555511698f (/lib64/libpthread.so.0+0x1298f)
 #3 0x00000000008aece4 check_data_clauses_for_pgas() (/opt/cray/pe/cce/21.0.4/cce/x86_64/bin/optcg+0x8aece4)
 #4 0x00000000008f94c0 initial_mt_processing() (/opt/cray/pe/cce/21.0.4/cce/x86_64/bin/optcg+0x8f94c0)
 #5 0x000000000071f0a5 void run_pass_helper<void>::exec<void (&)()>(int, char const*, void (&)()) (/opt/cray/pe/cce/21.0.4/cce/x86_64/bin/optcg+0x71f0a5)

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

CCE 21.0.3, MI300A unified

module load cce/21.0.3 craype-accel-amd-gfx942 rocm/7.2.0
module unload cray-mpich
ftn -fopenmp -O2 repro.f90 -o repro
HSA_XNACK=1 OMP_TARGET_OFFLOAD=mandatory ./repro

CCE 21.0.4, MI300A unified

module load cce/21.0.4 craype-accel-amd-gfx942 rocm/7.2.0
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 (41 lines)
! Finding: CCE 19, 20, 21 crash (internal compiler error) on a
! character scalar in the map clause of a standalone target enter data or
! target exit data construct. In this smallest form optcg is killed by
! signal 11 (ftn-2116 "optcg was terminated due to receipt of signal 013:
! Segmentation fault"); in larger programs the same statements give
! "Unhandled expression type in get base or dv mem" (s1 seed 8634; with a
! derived-type variable and an internal subroutine in the program,
! data/evidence/dataenv_probe/ice/a5.f90 gives it on CCE 19, 20 and 21) or
! "unexpected type in TYPE_DEREF" (s1 seed 2952 on CCE 21). Character
! arrays in the same constructs compile (data/evidence/dataenv_probe/ice/c2.f90).
!
! Legal OpenMP 5.2: a character scalar is a variable list item of map
! (5.2 §5.8.3; the enter and exit data constructs take map clauses, §13.6,
! §13.7). (A gfortran -fopenmp accept is no evidence: rule of 2026-10-23.) Expected: "RESULT
! check=pass".
!
! Observed (tuolumne, MI300A, -O2, 2026-10-23, results/t28_probe/icev3.log
! and icev.log; data/evidence/dataenv_probe/ice/c1.f90 is this program):
! - CCE 19.0.0, 20.0.2, 21.0.3: ftn-2116, optcg killed by signal 11; the
!   same with map(delete: xs) on exit data alone
!   (data/evidence/dataenv_probe/ice_char_exit_delete.f90);
! - AFAR amdflang 24.0.0git: compiles and prints "RESULT check=pass".
! - Tioga MI250X (gfx90a, HSA_XNACK=0): CCE 21 the same ICE
!   (results/t28_probe/g90/ice_char_exit_delete.cce21_g90.json).
! Fuzz campaign s1: the "Unhandled expression type in get base or dv mem"
! and "unexpected type in TYPE_DEREF" ICE cells of CCE 19/20/21 (most of
! those programs map character scalars and arrays in target enter data;
! not every one was reduced). The confirmer's reduction of seed 8634
! (results/confirm/drafts/fuzz_s1_8634_cce21_gfx942_unified, 151 -> 76
! lines, ICE site kept) keeps "!$omp target exit data map(delete: xs)" of
! character(len=8) :: xs; this file is reduced from it by hand.
!
! ftn -fopenmp -O2
program p
  implicit none
  character(len=8) :: xs
  xs = 'abcdefgh'
  !$omp target enter data map(to: xs)
  !$omp target exit data map(release: xs)
  print '(a)', 'RESULT check=pass'
end program p

Source in the repository

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..
 #0 0x0000000001763747 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0x1763747)
 #1 0x000000000176063b SignalHandler(int) (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0x176063b)
 #2 0x000015555511698f (/lib64/libpthread.so.0+0x1298f)
 #3 0x0000000000ad1034 check_data_clauses_for_pgas() (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0xad1034)
 #4 0x0000000000b0e823 initial_mt_processing() (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0xb0e823)
 #5 0x000000000094fea5 void run_pass_helper<void>::exec<void (&)()>(int, char const*, void (&)()) (/opt/cray/pe/cce/19.0.0/cce/x86_64/bin/optcg+0x94fea5)

What the specification requires

The specification text this program relies on and the compiler is expected to support.

OpenMP 5.2 §5.8.3

OpenMP 5.2 §13.6

OpenMP 5.2 §13.7

Evidence

Same compiler, one change

  • a character array xs(2) instead of a character scalar: 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
    program p
      implicit none
      character(len=8) :: xs(2)
      xs = 'abcdefgh'
      !$omp target enter data map(to: xs)
      !$omp target exit data map(release: xs)
      print '(a)', 'RESULT check=pass'
    end program p
    

Other compilers run it correctly

AFAR 24.3.0, NVHPC 25.11, NVHPC 26.9, GCC 16.2.0