Skip to content

flang-new unhandled reduction container, UNREACHABLE executed #80739

Closed
@keidavis

Description

@keidavis

Reproducer below. LLVM project source updated Feb 5 2024.

flang-new -fopenmp -c

Interestingly, the crash goes away if !$OMP SIMD is removed.

MODULE kernel_module

CONTAINS

  SUBROUTINE kernel

    IMPLICIT NONE

    INTEGER :: xl, xh, yl, yh
    REAL    :: r

    INTEGER :: j, k
    REAL    :: c

    xl = 0 ; xh = 1 ; yl = 0 ; yh = 1
    r = 0.0 ; c = 0.0

    !$OMP PARALLEL                                                                                             
    !$OMP DO PRIVATE(c) REDUCTION(+ : r)                                                                       
    DO k = yl, yh
    !$OMP SIMD                                                                                                 
      DO j = xl, xh
        r = r + c
      ENDDO
    ENDDO
    !$OMP END DO                                                                                               
    !$OMP END PARALLEL                                                                                         

  END SUBROUTINE kernel

END MODULE kernel_module

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions