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] Implement semantic check for privatization of statement function variables #54677

Closed
kiranchandramohan opened this issue Mar 31, 2022 · 4 comments · Fixed by #106550
Closed

Comments

@kiranchandramohan
Copy link
Contributor

The OpenMP standard (page 108, Section 4.3) says that "Variables that appear in namelist statements, in variable format expressions, and in expressions for statement function definitions, must not be privatized."

This check was implemented in https://reviews.llvm.org/D93213. This has to be reverted due to some ordering issues.

This ticket is a reminder to re-implement this check.

@llvmbot
Copy link
Member

llvmbot commented Mar 31, 2022

@llvm/issue-subscribers-flang-frontend

@llvmbot
Copy link
Member

llvmbot commented Mar 31, 2022

@llvm/issue-subscribers-openmp

@shiltian shiltian changed the title Implement semantic check for privatization of statement function variables [Flang] Implement semantic check for privatization of statement function variables Jan 19, 2023
@tblah tblah assigned tblah and unassigned kiranchandramohan Aug 28, 2024
tblah added a commit to tblah/llvm-project that referenced this issue Aug 29, 2024
OpenMP prohibits privatisation of variables that appear in expressions
for statement functions.

This is a re-working of an old patch https://reviews.llvm.org/D93213 by
@praveen-g-ctt.

The old patch couldn't be landed because of ordering concerns. Statement
functions are rewritten during parse tree rewriting, but this was done
after resolve-directives and so some array expressions were incorrectly
identified as statement functions. For this reason **I have opted to
re-order the semantics driver so that resolve-directives is run after
parse tree rewriting**.

Closes llvm#54677

Co-authored-by: Praveen <praveen@compilertree.com>
@tblah
Copy link
Contributor

tblah commented Sep 9, 2024

tblah added a commit to tblah/llvm-project that referenced this issue Oct 2, 2024
OpenMP prohibits privatisation of variables that appear in expressions
for statement functions.

This is a re-working of an old patch https://reviews.llvm.org/D93213 by
@praveen-g-ctt.

The old patch couldn't be landed because of ordering concerns. Statement
functions are rewritten during parse tree rewriting, but this was done
after resolve-directives and so some array expressions were incorrectly
identified as statement functions. For this reason **I have opted to
re-order the semantics driver so that resolve-directives is run after
parse tree rewriting**.

Closes llvm#54677

Co-authored-by: Praveen <praveen@compilertree.com>
tblah added a commit that referenced this issue Oct 4, 2024
OpenMP prohibits privatisation of variables that appear in expressions
for statement functions.

This is a re-working of an old patch https://reviews.llvm.org/D93213 by
@praveen-g-ctt.

The old patch couldn't be landed because of ordering concerns. Statement
functions are rewritten during parse tree rewriting, but this was done
after resolve-directives and so some array expressions were incorrectly
identified as statement functions. For this reason **I have opted to
re-order the semantics driver so that resolve-directives is run after
parse tree rewriting**.

Closes #54677

---------

Co-authored-by: Praveen <praveen@compilertree.com>
@llvmbot
Copy link
Member

llvmbot commented Oct 4, 2024

@llvm/issue-subscribers-flang-ir

Author: Kiran Chandramohan (kiranchandramohan)

The [OpenMP standard](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5-2.pdf) (page 108, Section 4.3) says that "Variables that appear in namelist statements, in variable format expressions, and in expressions for statement function definitions, must not be privatized."

This check was implemented in https://reviews.llvm.org/D93213. This has to be reverted due to some ordering issues.

This ticket is a reminder to re-implement this check.

xgupta pushed a commit to xgupta/llvm-project that referenced this issue Oct 4, 2024
…06550)

OpenMP prohibits privatisation of variables that appear in expressions
for statement functions.

This is a re-working of an old patch https://reviews.llvm.org/D93213 by
@praveen-g-ctt.

The old patch couldn't be landed because of ordering concerns. Statement
functions are rewritten during parse tree rewriting, but this was done
after resolve-directives and so some array expressions were incorrectly
identified as statement functions. For this reason **I have opted to
re-order the semantics driver so that resolve-directives is run after
parse tree rewriting**.

Closes llvm#54677

---------

Co-authored-by: Praveen <praveen@compilertree.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants