gcc/testsuite/gfortran.dg/class_24.f03
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! PR 44869: [OOP] Missing TARGET check - and wrong code or accepts-invalid? |
| 4 | ! |
| 5 | ! Contributed by Satish.BD <[email protected]> |
| 6 | |
| 7 | type :: test_case |
| 8 | end type |
| 9 | |
| 10 | type :: test_suite |
| 11 | type(test_case) :: list |
| 12 | end type |
| 13 | |
| 14 | contains |
| 15 | |
| 16 | subroutine sub(self) |
| 17 | class(test_suite), intent(inout) :: self |
| 18 | type(test_case), pointer :: tst_case |
| 19 | tst_case => self%list ! { dg-error "is neither TARGET nor POINTER" } |
| 20 | end subroutine |
| 21 | |
| 22 | end |