From: Jerry DeLisle Date: Fri, 16 May 2008 20:20:08 +0000 (+0000) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e864c0c313944ae8498c8c2197b36038d91515cf;p=gcc.git [multiple changes] 2008-05-16 Jerry DeLisle * gfortran.dg/missing_parens_1.f90: Update test. * gfortran.dg/fmt_t_7.f: Update test. 2008-05-16 Steven G. Kargl * gfortran.dg/int_3.f90: New test. * gfortran.dg/and_or_xor.f90: New test. From-SVN: r135441 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4b2dace4dfe..74fd3808909 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,14 @@ -2008-04-16 Daniel Kraft +2008-05-16 Jerry DeLisle + + * gfortran.dg/missing_parens_1.f90: Update test. + * gfortran.dg/fmt_t_7.f: Update test. + +2008-05-16 Steven G. Kargl + + * gfortran.dg/int_3.f90: New test. + * gfortran.dg/and_or_xor.f90: New test. + +2008-05-16 Daniel Kraft PR fortran/27997 * gfortran.dg/array_constructor_type_1.f03: New test diff --git a/gcc/testsuite/gfortran.dg/and_or_xor.f90 b/gcc/testsuite/gfortran.dg/and_or_xor.f90 new file mode 100644 index 00000000000..412008b77bf --- /dev/null +++ b/gcc/testsuite/gfortran.dg/and_or_xor.f90 @@ -0,0 +1,7 @@ +! { dg-do run } +program L + if (and(.TRUE._1, .TRUE._1) .neqv. .true.) call abort + if (or(.TRUE._1, .TRUE._1) .neqv. .true.) call abort + if (xor(.TRUE._1, .TRUE._1) .neqv. .false.) call abort +end program L + diff --git a/gcc/testsuite/gfortran.dg/fmt_t_7.f b/gcc/testsuite/gfortran.dg/fmt_t_7.f index 4b8045ba43a..baef07ea7bd 100644 --- a/gcc/testsuite/gfortran.dg/fmt_t_7.f +++ b/gcc/testsuite/gfortran.dg/fmt_t_7.f @@ -1,16 +1,16 @@ -! { dg-do run { target fd_truncate } } -! PR34974 null bytes when reverse-tabbing long records -! Test case prpared by Jerry DeLisle - program test - character(1) :: a, b, c - write (10,'(t50000,a,t1,a)') 'b', 'a' - close (10) - open (10, access="stream") - read (10, pos=1) a - read (10, pos=50000) b - read (10, pos=25474) c - close (10, status="delete") - if (a /= "a") call abort - if (b /= "b") call abort - if (c /= " ") call abort - end +! { dg-do run { target fd_truncate } } +! PR34974 null bytes when reverse-tabbing long records +! Test case prpared by Jerry DeLisle + program test + character(1) :: a, b, c + write (10,'(t50000,a,t1,a)') 'b', 'a' + close (10) + open (10, access="stream") + read (10, pos=1) a + read (10, pos=50000) b + read (10, pos=25474) c + close (10, status="delete") + if (a /= "a") call abort + if (b /= "b") call abort + if (c /= " ") call abort + end diff --git a/gcc/testsuite/gfortran.dg/int_3.f90 b/gcc/testsuite/gfortran.dg/int_3.f90 new file mode 100644 index 00000000000..689beef4b89 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/int_3.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +subroutine bug1 + integer, parameter :: ik1 = 1, ik2 = 2 + integer, parameter :: i = kind(int((0.,0.), kind=ik1)) + integer, parameter :: j = kind(int((0.,0.), kind=ik2)) + integer, parameter :: k = kind(int(0., kind=ik1)) + integer, parameter :: l = kind(int(0., kind=ik2)) + integer, parameter :: m = kind(int(0, kind=ik1)) + integer, parameter :: n = kind(int(0, kind=ik2)) +end subroutine bug1 diff --git a/gcc/testsuite/gfortran.dg/missing_parens_1.f90 b/gcc/testsuite/gfortran.dg/missing_parens_1.f90 index 70c348810c8..e9657f9bcad 100644 --- a/gcc/testsuite/gfortran.dg/missing_parens_1.f90 +++ b/gcc/testsuite/gfortran.dg/missing_parens_1.f90 @@ -3,6 +3,8 @@ program aa implicit none real(kind=8)::r1=0 +real(kind=8),dimension((1)::r2 ! { dg-error "Missing '\\)' in statement" } +real(kind=8),dimension(3,3)::r3 character(25) :: a a = 'I am not a )))))'')''.' if ((((((a /= "I am not a )))))')'.")))))) call abort @@ -11,4 +13,7 @@ a = "I am not a )))))"")""." if ((((((a /= "I am not a )))))"")"".")))))) call abort if (((3*r1)**2)>= 0) a = "good" if ((3*r1)**2)>= 0) a = "bad" ! { dg-error "Missing '\\(' in statement" } +r3((2,2)) = 4.3 ! { dg-error "found COMPLEX" } +do while ((.true.) ! { dg-error "Missing '\\)' in statement" } +do while (.true. ! { dg-error "Missing '\\)' in statement" } end