1! { dg-do run }
2! PR 27470: This used fail because of confusion between
3!           mol (allocatable) and mol(1)%array(:) (pointer).
4!           Derived from a test case by FX Coudert.
5PROGRAM MAIN
6  TYPE foo
7    INTEGER, DIMENSION(:), POINTER :: array
8  END TYPE foo
9
10  type(foo),allocatable,dimension(:) :: mol
11
12  ALLOCATE (mol(1))
13  ALLOCATE (mol(1)%array(5))
14  ALLOCATE (mol(1)%array(5))
15
16  END
17