Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang][OpenMP] assertion failure for copying of common variables #112538

Open
tblah opened this issue Oct 16, 2024 · 1 comment
Open

[flang][OpenMP] assertion failure for copying of common variables #112538

tblah opened this issue Oct 16, 2024 · 1 comment

Comments

@tblah
Copy link
Contributor

tblah commented Oct 16, 2024

flang -fopenmp currently hits an assertion failure building this program: https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0070/0070_0185.f03

llvm-project/flang/include/flang/Optimizer/Builder/BoxValue.h:375: fir::MutableBoxValue::MutableBoxValue(mlir::Value, mlir::ValueRange, MutableProperties): Assertion `verify() && "MutableBoxValue requires mem ref to fir.box<fir.[heap|ptr]<type>>"` failed.

There are two problems here

  1. We should add a semantic check similar to [flang][Semantics][OpenMP] don't reduce variables in namelist #110671 which prevents namelist variables in copyin. This is already not allowed in private and reduction and it was concluded in the above PR that even if the standard allows this we should not support it because it would be difficult to do without introducing performance regressions
  2. The assertion failure (reproducible with the name-list removed)
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 16, 2024

@llvm/issue-subscribers-flang-ir

Author: Tom Eccles (tblah)

`flang -fopenmp` currently hits an assertion failure building this program: https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0070/0070_0185.f03
llvm-project/flang/include/flang/Optimizer/Builder/BoxValue.h:375: fir::MutableBoxValue::MutableBoxValue(mlir::Value, mlir::ValueRange, MutableProperties): Assertion `verify() &amp;&amp; "MutableBoxValue requires mem ref to fir.box&lt;fir.[heap|ptr]&lt;type&gt;&gt;"` failed.

There are two problems here

  1. We should add a semantic check similar to [flang][Semantics][OpenMP] don't reduce variables in namelist #110671 which prevents namelist variables in copyin. This is already not allowed in private and reduction and it was concluded in the above PR that even if the standard allows this we should not support it because it would be difficult to do without introducing performance regressions
  2. The assertion failure (reproducible with the name-list removed)

@EugeneZelenko EugeneZelenko changed the title [flang][OpenMP] assertion failure for copyin of common variables [flang][OpenMP] assertion failure for copying of common variables Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants