OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [fmt_error_3.f90] - Blame information for rev 862

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
 
3
! PR fortran/29835
4
! Check for improved format error messages with correct locus and more detailed
5
! "unexpected element" messages.
6
 
7
SUBROUTINE format_labels
8
  IMPLICIT NONE
9
 
10
1 FORMAT (A, &
11
          A, &
12
          Q, & ! { dg-error "Unexpected element 'Q'" }
13
          A)
14
 
15
2 FORMAT (A, &
16
          I, & ! { dg-error "Nonnegative width" }
17
          A)
18
 
19
END SUBROUTINE format_labels
20
 
21
SUBROUTINE format_strings
22
  IMPLICIT NONE
23
  CHARACTER(len=32), PARAMETER :: str = "hello"
24
  INTEGER :: x
25
 
26
  PRINT '(A, Q, A)', & ! { dg-error "Unexpected element 'Q'" }
27
        str, str, str ! { dg-bogus "Unexpected element" }
28
 
29
  PRINT '(A, ' // & ! { dg-error "Nonnegative width" }
30
        ' I, ' // &
31
        ' A)', str, str, str ! { dg-bogus "Nonnegative width" }
32
 
33
  READ '(Q)', & ! { dg-error "Unexpected element 'Q'" }
34
       x ! { dg-bogus "Unexpected element" }
35
 
36
END SUBROUTINE format_strings

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.