* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_alloc_opt_9.f90
blobe51a7ec868a19f3735a48e25ffc73eef9579c9ec
1 ! { dg-do compile }
3 ! PR 43388: [F2008][OOP] ALLOCATE with MOLD=
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 type :: t
8 end type
10 type :: u
11 end type
13 class(t),allocatable :: x
14 type(t) :: z1,z2
15 type(u) :: z3
17 allocate(x,MOLD=z1,MOLD=z2) ! { dg-error "Redundant MOLD tag" }
18 allocate(x,SOURCE=z1,MOLD=z2) ! { dg-error "conflicts with SOURCE tag" }
19 allocate(t::x,MOLD=z1) ! { dg-error "conflicts with the typespec" }
21 allocate(x,MOLD=z3) ! { dg-error "is type incompatible" }
23 end