Skip to content

[flang][Semantics] Testcase for declaration conflict with named-const… #111556

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

Merged

Conversation

kparzysz
Copy link
Contributor

@kparzysz kparzysz commented Oct 8, 2024

…ruct

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:semantics labels Oct 8, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 8, 2024

@llvm/pr-subscribers-flang-semantics

Author: Krzysztof Parzyszek (kparzysz)

Changes

…ruct


Full diff: https://github.com/llvm/llvm-project/pull/111556.diff

1 Files Affected:

  • (added) flang/test/Semantics/named-construct-declaration-conflict.f90 (+10)
diff --git a/flang/test/Semantics/named-construct-declaration-conflict.f90 b/flang/test/Semantics/named-construct-declaration-conflict.f90
new file mode 100644
index 00000000000000..c96a037888e228
--- /dev/null
+++ b/flang/test/Semantics/named-construct-declaration-conflict.f90
@@ -0,0 +1,10 @@
+!RUN: %python %S/test_errors.py %s %flang_fc1
+
+subroutine foo()
+  integer :: nxloop
+!ERROR: 'nxloop' is already declared in this scoping unit
+  nxloop: do i = 1, 100
+  enddo nxloop
+end subroutine
+
+

Copy link
Contributor

@mjklemm mjklemm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@raghavendhra raghavendhra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kparzysz kparzysz merged commit d17ad77 into llvm:main Oct 8, 2024
9 checks passed
@kparzysz kparzysz deleted the users/kparzysz/flang-testcase-decl-conflict branch October 8, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:semantics flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants