Skip to content

[Flang][OpenMP] assertion failure on reduction  #88935

Closed
@ye-luo

Description

@ye-luo

From my night build on 6da1966
reproducer main.f90

program main
  implicit none

  integer:: i
  REAL(8) :: EtsvdW_period
  REAL(8) :: HtsvdW_period(3,3)

  !$omp parallel do reduction(+:EtsvdW_period) reduction(+:HtsvdW_period)
  do i=1,10
  enddo

endprogram

compilation failure.

yeluo@jlselogin5:~> flang-new -fopenmp main.f90 
flang-new: /gpfs/jlse-fs0/users/yeluo/opt/llvm-clang/llvm-project-nightly/llvm/lib/IR/Instructions.cpp:3292: static BinaryOperator *llvm::BinaryOperator::Create(BinaryOps, Value *, Value *, const Twine &, Instruction *): Assertion `S1->getType() == S2->getType() && "Cannot create binary operator with two operands of differing type!"' failed.

compilation works after being changed to

  !$omp parallel do reduction(+:EtsvdW_period, HtsvdW_period)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions