This is a minor patch for a minor problem, I will check it in as
obvious if no one objects.  While looking at another issue I found that
the gfortran.log file created by testing contains some non-ascii
characters, this bothered me and caused some problems when grepping for
things.  I tracked down the problem to these 3 tests that are printing
out 0 valued character variables.  The variables are supposed to be 0,
because that is what the test is checking for, so my fix is to print
out the ichar value of the character variable instead of the variable
itself.

Steve Ellcey
sell...@cavium.com


2017-08-25  Steve Ellcey  <sell...@cavium.com>

        * gfortran.dg/dec_init_1.f90 (dummy): Use ichar in print statement.
        * gfortran.dg/dec_init_2.f90 (dummy): Ditto.
        * gfortran.dg/dec_init_3.f90 (dummy): Ditto.

diff --git a/gcc/testsuite/gfortran.dg/dec_init_1.f90 b/gcc/testsuite/gfortran.dg/dec_init_1.f90
index 03ada9c..5e1956a 100644
--- a/gcc/testsuite/gfortran.dg/dec_init_1.f90
+++ b/gcc/testsuite/gfortran.dg/dec_init_1.f90
@@ -14,7 +14,7 @@ subroutine dummy(i1,r1,c1,l1,i2,r2,c2,l2)
   real, intent(inout) :: r2
   character, intent(inout) :: c2
   logical, intent(inout) :: l2
-  print *, i1, i2, l1, l2, c1, c2, r1, r2
+  print *, i1, i2, l1, l2, ichar(c1), ichar(c2), r1, r2
   if ( i1 .ne. 0 .or. i2 .ne. 0 ) call abort()
   if ( l1 .or. l2 ) call abort()
   if ( c1 .ne. achar(0) .or. c2 .ne. achar(0) ) call abort()
diff --git a/gcc/testsuite/gfortran.dg/dec_init_2.f90 b/gcc/testsuite/gfortran.dg/dec_init_2.f90
index 41deac9..eae5549 100644
--- a/gcc/testsuite/gfortran.dg/dec_init_2.f90
+++ b/gcc/testsuite/gfortran.dg/dec_init_2.f90
@@ -15,7 +15,7 @@ subroutine dummy(i1,r1,c1,l1,i2,r2,c2,l2)
   real, intent(inout) :: r2
   character, intent(inout) :: c2
   logical, intent(inout) :: l2
-  print *, i1, i2, l1, l2, c1, c2, r1, r2
+  print *, i1, i2, l1, l2, ichar(c1), ichar(c2), r1, r2
   if ( i1 .ne. 42 .or. i2 .ne. 42 ) call abort()
   if ( (.not. l1) .or. (.not. l2) ) call abort()
   if ( c1 .ne. achar(32) .or. c2 .ne. achar(32) ) call abort()
diff --git a/gcc/testsuite/gfortran.dg/dec_init_3.f90 b/gcc/testsuite/gfortran.dg/dec_init_3.f90
index 6c1161a..253cd9b 100644
--- a/gcc/testsuite/gfortran.dg/dec_init_3.f90
+++ b/gcc/testsuite/gfortran.dg/dec_init_3.f90
@@ -14,7 +14,7 @@ subroutine dummy(i1,r1,c1,l1,i2,r2,c2,l2)
   real, intent(inout) :: r2
   character, intent(inout) :: c2
   logical, intent(inout) :: l2
-  print *, i1, i2, l1, l2, c1, c2, r1, r2
+  print *, i1, i2, l1, l2, ichar(c1), ichar(c2), r1, r2
   if ( i1 .ne. 0 .or. i2 .ne. 0 ) call abort()
   if ( l1 .or. l2 ) call abort()
   if ( c1 .ne. achar(0) .or. c2 .ne. achar(0) ) call abort()

Reply via email to