diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gfortran.dg/fmt_l.f90 | |
download | cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.bz2 cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gfortran.dg/fmt_l.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/fmt_l.f90 | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/fmt_l.f90 b/gcc/testsuite/gfortran.dg/fmt_l.f90 new file mode 100644 index 000000000..9dc4f5704 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/fmt_l.f90 @@ -0,0 +1,85 @@ +! { dg-do run } +! { dg-options "-std=gnu -pedantic -ffree-line-length-none" } +! Test the GNU extension of a L format descriptor without width +! PR libfortran/21303 +program test_l + logical(kind=1) :: l1 + logical(kind=2) :: l2 + logical(kind=4) :: l4 + logical(kind=8) :: l8 + + character(len=20) :: str + + l1 = .true. + write (str,"(L)") l1 ! { dg-warning "Extension: Missing positive width after L descriptor" } + read (str,"(L)") l1 ! { dg-warning "Extension: Missing positive width after L descriptor" } + if (l1 .neqv. .true.) call abort + + l2 = .true. + write (str,"(L)") l2 ! { dg-warning "Extension: Missing positive width after L descriptor" } + read (str,"(L)") l2 ! { dg-warning "Extension: Missing positive width after L descriptor" } + if (l2 .neqv. .true.) call abort + + l4 = .true. + write (str,"(L)") l4 ! { dg-warning "Extension: Missing positive width after L descriptor" } + read (str,"(L)") l4 ! { dg-warning "Extension: Missing positive width after L descriptor" } + if (l4 .neqv. .true.) call abort + + l8 = .true. + write (str,"(L)") l8 ! { dg-warning "Extension: Missing positive width after L descriptor" } + read (str,"(L)") l8 ! { dg-warning "Extension: Missing positive width after L descriptor" } + if (l8 .neqv. .true.) call abort + + l1 = .false. + write (str,"(L)") l1 ! { dg-warning "Extension: Missing positive width after L descriptor" } + read (str,"(L)") l1 ! { dg-warning "Extension: Missing positive width after L descriptor" } + if (l1 .neqv. .false.) call abort + + l2 = .false. + write (str,"(L)") l2 ! { dg-warning "Extension: Missing positive width after L descriptor" } + read (str,"(L)") l2 ! { dg-warning "Extension: Missing positive width after L descriptor" } + if (l2 .neqv. .false.) call abort + + l4 = .false. + write (str,"(L)") l4 ! { dg-warning "Extension: Missing positive width after L descriptor" } + read (str,"(L)") l4 ! { dg-warning "Extension: Missing positive width after L descriptor" } + if (l4 .neqv. .false.) call abort + + l8 = .false. + write (str,"(L)") l8 ! { dg-warning "Extension: Missing positive width after L descriptor" } + read (str,"(L)") l8 ! { dg-warning "Extension: Missing positive width after L descriptor" } + if (l8 .neqv. .false.) call abort + +end program test_l +! { dg-output "At line 14 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 15 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 19 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 20 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 24 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 25 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 29 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 30 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 34 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 35 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 39 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 40 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 44 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 45 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 49 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } +! { dg-output "At line 50 of file.*" } +! { dg-output "Fortran runtime warning: Positive width required in format(\n|\r\n|\r)" } |