[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:50:32 PDT 2024


https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/111556

…ruct

>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] [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
+
+



More information about the flang-commits mailing list