summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/extends_12.f03
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/extends_12.f03')
-rw-r--r--gcc/testsuite/gfortran.dg/extends_12.f0324
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/extends_12.f03 b/gcc/testsuite/gfortran.dg/extends_12.f03
new file mode 100644
index 000000000..a93f6d0f1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/extends_12.f03
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR 48706: Type extension inside subroutine
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module mod_diff_01
+ implicit none
+ type :: foo
+ end type
+contains
+ subroutine create_ext
+ type, extends(foo) :: foo_e
+ end type
+ end subroutine
+end module
+
+program diff_01
+ use mod_diff_01
+ implicit none
+ call create_ext()
+end program
+
+! { dg-final { cleanup-modules "mod_diff_01" } }