OSDN Git Service

2008-03-04 Uros Bizjak <ubizjak@gmail.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / host_assoc_types_1.f90
1 ! { dg-do compile }
2 ! Tests the fix for PR29232, in which the invalid code below was not
3 ! diagnosed.
4 !
5 ! Contributed by Tobias Burnus  <tobias.burnus@physik.fu-berlin.de>
6 !
7 MODULE test
8      TYPE vertex
9            INTEGER :: k
10      END TYPE vertex
11 CONTAINS
12      SUBROUTINE S1()
13          TYPE(vertex) :: a  ! { dg-error "cannot be host associated" }
14          vertex : DO i=1,2  ! { dg-error "incompatible object of the same name" }
15          ENDDO vertex
16      END SUBROUTINE
17 END MODULE test
18 ! { dg-final { cleanup-modules "test" } }