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 0000000000000..d3e72e221368c --- /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 :: xyz +!ERROR: 'xyz' is already declared in this scoping unit + xyz: do i = 1, 100 + enddo xyz +end subroutine + +