2 ! { dg-options "-std=gnu -pedantic -ffree-line-length-none" }
3 ! Test the GNU extension of a L format descriptor without width
11 character(len
=20) :: str
14 write (str
,"(L)") l1
! { dg-warning "Extension: Missing positive width after L descriptor" }
15 read (str
,"(L)") l1
! { dg-warning "Extension: Missing positive width after L descriptor" }
16 if (l1
.neqv
. .true
.) call abort
19 write (str
,"(L)") l2
! { dg-warning "Extension: Missing positive width after L descriptor" }
20 read (str
,"(L)") l2
! { dg-warning "Extension: Missing positive width after L descriptor" }
21 if (l2
.neqv
. .true
.) call abort
24 write (str
,"(L)") l4
! { dg-warning "Extension: Missing positive width after L descriptor" }
25 read (str
,"(L)") l4
! { dg-warning "Extension: Missing positive width after L descriptor" }
26 if (l4
.neqv
. .true
.) call abort
29 write (str
,"(L)") l8
! { dg-warning "Extension: Missing positive width after L descriptor" }
30 read (str
,"(L)") l8
! { dg-warning "Extension: Missing positive width after L descriptor" }
31 if (l8
.neqv
. .true
.) call abort
34 write (str
,"(L)") l1
! { dg-warning "Extension: Missing positive width after L descriptor" }
35 read (str
,"(L)") l1
! { dg-warning "Extension: Missing positive width after L descriptor" }
36 if (l1
.neqv
. .false
.) call abort
39 write (str
,"(L)") l2
! { dg-warning "Extension: Missing positive width after L descriptor" }
40 read (str
,"(L)") l2
! { dg-warning "Extension: Missing positive width after L descriptor" }
41 if (l2
.neqv
. .false
.) call abort
44 write (str
,"(L)") l4
! { dg-warning "Extension: Missing positive width after L descriptor" }
45 read (str
,"(L)") l4
! { dg-warning "Extension: Missing positive width after L descriptor" }
46 if (l4
.neqv
. .false
.) call abort
49 write (str
,"(L)") l8
! { dg-warning "Extension: Missing positive width after L descriptor" }
50 read (str
,"(L)") l8
! { dg-warning "Extension: Missing positive width after L descriptor" }
51 if (l8
.neqv
. .false
.) call abort
54 ! { dg-output "At line 14 of file.*" }
55 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
56 ! { dg-output "At line 15 of file.*" }
57 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
58 ! { dg-output "At line 19 of file.*" }
59 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
60 ! { dg-output "At line 20 of file.*" }
61 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
62 ! { dg-output "At line 24 of file.*" }
63 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
64 ! { dg-output "At line 25 of file.*" }
65 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
66 ! { dg-output "At line 29 of file.*" }
67 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
68 ! { dg-output "At line 30 of file.*" }
69 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
70 ! { dg-output "At line 34 of file.*" }
71 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
72 ! { dg-output "At line 35 of file.*" }
73 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
74 ! { dg-output "At line 39 of file.*" }
75 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
76 ! { dg-output "At line 40 of file.*" }
77 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
78 ! { dg-output "At line 44 of file.*" }
79 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
80 ! { dg-output "At line 45 of file.*" }
81 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
82 ! { dg-output "At line 49 of file.*" }
83 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }
84 ! { dg-output "At line 50 of file.*" }
85 ! { dg-output "Fortran runtime warning: Positive width required with L descriptor(\n|\r\n|\r)" }