diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/class_46.f03')
-rw-r--r-- | gcc/testsuite/gfortran.dg/class_46.f03 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_46.f03 b/gcc/testsuite/gfortran.dg/class_46.f03 new file mode 100644 index 000000000..4719c252f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_46.f03 @@ -0,0 +1,18 @@ +! { dg-do run } +! +! PR 50625: [4.6/4.7 Regression][OOP] ALLOCATABLE attribute lost for module CLASS variables +! +! Contributed by Tobias Burnus <burnus@gcc.gnu.org> + +module m +type t +end type t +class(t), allocatable :: x +end module m + +use m +implicit none +if (allocated(x)) call abort() +end + +! { dg-final { cleanup-modules "m" } } |