1! { dg-do compile }
2! Test fix for PR56575.
3!
4! Contributed by A Kasahara  <latlon90180+gcc_bugzilla@gmail.com>
5!
6module lib_container
7  implicit none
8
9  type:: Object
10  end type Object
11
12  type:: Container
13    class(Object):: v ! { dg-error "must be allocatable or pointer" }
14  end type Container
15
16contains
17
18  subroutine proc(self)
19    class(Container), intent(inout):: self
20  end subroutine proc
21end module lib_container
22
23