blob: 9396ef443a07e31b947c5cf4ac7022f97ad0b5da [file] [log] [blame]
! { dg-do compile }
! { dg-options "-std=f2003" }
! Based on PR fortran/66724, also covers fortran/66725 and fortran/87923.
!
flush (1, iomsg=1) ! { dg-error "IOMSG tag at ... must be of type CHARACTER" }
flush (1, iomsg=1e1) ! { dg-error "IOMSG tag at ... must be of type CHARACTER" }
flush (1, iomsg=1d1) ! { dg-error "IOMSG tag at ... must be of type CHARACTER" }
flush (1, iomsg=.false.) ! { dg-error "IOMSG tag at ... must be of type CHARACTER" }
flush (1, iomsg='') ! { dg-error "Non-variable expression" }
flush (1, iomsg='no') ! { dg-error "Non-variable expression" }
flush (1, iomsg=null()) ! { dg-error "IOMSG tag at ... must be of type CHARACTER" }
flush (1, iomsg=(1)) ! { dg-error "IOMSG tag at ... must be of type CHARACTER" }
flush (1, iomsg=(1., 0.)) ! { dg-error "IOMSG tag at ... must be of type CHARACTER" }
flush (1, iomsg=[1]) ! { dg-error "IOMSG tag at ... must be of type CHARACTER" }
flush (1, iomsg=['']) ! { dg-error "IOMSG tag at ... must be scalar" }
end