OSDN Git Service

* tree.h: Declare make_decl_rtl_for_debug.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / fmt_l.f90
1 ! { dg-do run }
2 ! { dg-options "-std=gnu -pedantic -ffree-line-length-none" }
3 ! Test the GNU extension of a L format descriptor without width
4 ! PR libfortran/21303
5 program test_l
6   logical(kind=1) :: l1
7   logical(kind=2) :: l2
8   logical(kind=4) :: l4
9   logical(kind=8) :: l8
10
11   character(len=20) :: str
12
13   l1 = .true.
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
17
18   l2 = .true.
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
22
23   l4 = .true.
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
27
28   l8 = .true.
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
32
33   l1 = .false.
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
37
38   l2 = .false.
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
42
43   l4 = .false.
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
47
48   l8 = .false.
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
52
53 end program test_l
54 ! { dg-output "At line 14 of file.*" }
55 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
56 ! { dg-output "At line 15 of file.*" }
57 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
58 ! { dg-output "At line 19 of file.*" }
59 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
60 ! { dg-output "At line 20 of file.*" }
61 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
62 ! { dg-output "At line 24 of file.*" }
63 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
64 ! { dg-output "At line 25 of file.*" }
65 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
66 ! { dg-output "At line 29 of file.*" }
67 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
68 ! { dg-output "At line 30 of file.*" }
69 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
70 ! { dg-output "At line 34 of file.*" }
71 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
72 ! { dg-output "At line 35 of file.*" }
73 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
74 ! { dg-output "At line 39 of file.*" }
75 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
76 ! { dg-output "At line 40 of file.*" }
77 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
78 ! { dg-output "At line 44 of file.*" }
79 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
80 ! { dg-output "At line 45 of file.*" }
81 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
82 ! { dg-output "At line 49 of file.*" }
83 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }
84 ! { dg-output "At line 50 of file.*" }
85 ! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" }