view gcc/testsuite/gfortran.dg/host_assoc_types_1.f90 @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! Tests the fix for PR29232, in which the invalid code below was not
! diagnosed.
!
! Contributed by Tobias Burnus  <tobias.burnus@physik.fu-berlin.de>
!
MODULE test
     TYPE vertex
           INTEGER :: k
     END TYPE vertex
CONTAINS
     SUBROUTINE S1()
         TYPE(vertex) :: a  ! { dg-error "cannot be host associated" }
         vertex : DO i=1,2  ! { dg-error "incompatible object of the same name" }
         ENDDO vertex
     END SUBROUTINE
END MODULE test