[flang-commits] [flang] [flang][Semantics] Testcase for declaration conflict with named-const… (PR #111556)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Tue Oct 8 09:54:07 PDT 2024
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/111556
>From a8e5e2f402951a6491eb8b8ad2f0156f5b9e0936 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Tue, 8 Oct 2024 11:40:17 -0500
Subject: [PATCH 1/2] [flang][Semantics] Testcase for declaration conflict with
named-construct
---
.../Semantics/named-construct-declaration-conflict.f90 | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 flang/test/Semantics/named-construct-declaration-conflict.f90
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
+
+
>From 347934248036662e78bba6b29fb3631b9f13ddf9 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Tue, 8 Oct 2024 11:53:50 -0500
Subject: [PATCH 2/2] rename
---
.../Semantics/named-construct-declaration-conflict.f90 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/flang/test/Semantics/named-construct-declaration-conflict.f90 b/flang/test/Semantics/named-construct-declaration-conflict.f90
index c96a037888e228..d3e72e221368cd 100644
--- a/flang/test/Semantics/named-construct-declaration-conflict.f90
+++ b/flang/test/Semantics/named-construct-declaration-conflict.f90
@@ -1,10 +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
+ integer :: xyz
+!ERROR: 'xyz' is already declared in this scoping unit
+ xyz: do i = 1, 100
+ enddo xyz
end subroutine
More information about the flang-commits
mailing list