1! { dg-do compile }
2! { dg-options "-std=f2003" }
3!
4! PR 43388: [F2008][OOP] ALLOCATE with MOLD=
5!
6! Contributed by Janus Weil <janus@gcc.gnu.org>
7
8type :: t
9end type
10
11class(t),allocatable :: x
12type(t) :: z
13
14allocate(x,MOLD=z)  ! { dg-error "MOLD tag at" }
15
16end
17