4 ! Check for improved format error messages with correct locus and more detailed
5 ! "unexpected element" messages.
7 SUBROUTINE format_labels
12 Q
, & ! { dg-error "Unexpected element 'Q'" }
16 I
, & ! { dg-error "Nonnegative width" }
19 END SUBROUTINE format_labels
21 SUBROUTINE format_strings
23 CHARACTER(len
=32), PARAMETER :: str
= "hello"
26 PRINT '(A, Q, A)', & ! { dg-error "Unexpected element 'Q'" }
27 str
, str
, str
! { dg-bogus "Unexpected element" }
29 PRINT '(A, ' // & ! { dg-error "Nonnegative width" }
31 ' A)', str
, str
, str
! { dg-bogus "Nonnegative width" }
33 READ '(Q)', & ! { dg-error "Unexpected element 'Q'" }
34 x
! { dg-bogus "Unexpected element" }
36 END SUBROUTINE format_strings