aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/implicit_pure_2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/implicit_pure_2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_pure_2.f9017
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/implicit_pure_2.f90 b/gcc/testsuite/gfortran.dg/implicit_pure_2.f90
new file mode 100644
index 00000000000..496e856e04a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/implicit_pure_2.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! PR 51502 - this was wrongly detected to be implicit pure.
+module m
+ integer :: i
+contains
+ subroutine foo(x)
+ integer, intent(inout) :: x
+ outer: block
+ block
+ i = 5
+ end block
+ end block outer
+ end subroutine foo
+end module m
+
+! { dg-final { scan-module-absence "m" "IMPLICIT_PURE" } }
+! { dg-final { cleanup-modules "m" } }