diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/class_24.f03')
-rw-r--r-- | gcc/testsuite/gfortran.dg/class_24.f03 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_24.f03 b/gcc/testsuite/gfortran.dg/class_24.f03 new file mode 100644 index 000000000..085e6d1e1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_24.f03 @@ -0,0 +1,22 @@ +! { dg-do compile } +! +! PR 44869: [OOP] Missing TARGET check - and wrong code or accepts-invalid? +! +! Contributed by Satish.BD <bdsatish@gmail.com> + + type :: test_case + end type + + type :: test_suite + type(test_case) :: list + end type + +contains + + subroutine sub(self) + class(test_suite), intent(inout) :: self + type(test_case), pointer :: tst_case + tst_case => self%list ! { dg-error "is neither TARGET nor POINTER" } + end subroutine + +end |