diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/typebound_generic_7.f03')
-rw-r--r-- | gcc/testsuite/gfortran.dg/typebound_generic_7.f03 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_7.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_7.f03 new file mode 100644 index 000000000..2519ab094 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/typebound_generic_7.f03 @@ -0,0 +1,28 @@ +! { dg-do compile } +! +! PR 44434: [OOP] ICE in in gfc_add_component_ref +! +! Contributed by Salvatore Filippone <sfilippone@uniroma2.it> + +module foo_mod + type foo + contains + procedure :: doit + generic :: do => doit + end type +contains + subroutine doit(a) + class(foo) :: a + end subroutine +end module + +program testd15 +contains + subroutine dodo(x) + use foo_mod + class(foo) :: x + call x%do() + end subroutine +end + +! { dg-final { cleanup-modules "foo_mod" } } |