]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libfortran/19313 (inquire(pad=) not implemented)
authorBud Davis <bdavis9659@comcast.net>
Sun, 23 Jan 2005 14:19:54 +0000 (14:19 +0000)
committerBud Davis <bdavis@gcc.gnu.org>
Sun, 23 Jan 2005 14:19:54 +0000 (14:19 +0000)
2005-01-22  Bud Davis  <bdavis9659@comcast.net>

        PR fortran/19313
        * trans-io.c (gfc_trans_inquire): Added code to support
        pad.

        PR fortran/19313
        * gfortan.dg/inquire_6.f90: New test.

From-SVN: r94110

gcc/fortran/ChangeLog
gcc/fortran/trans-io.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/inquire_6.f90 [new file with mode: 0644]

index 2a6a758b017c115eb804d1acd74018c9629599cb..a182f892765091eaca786d83632a160b68d785d0 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-22  Bud Davis  <bdavis9659@comcast.net>
+
+       PR fortran/19313
+       * trans-io.c (gfc_trans_inquire): Added code to support
+       pad.
+
 2005-01-22  Steven G. Kargl  <kargls@comcast.net>
 
        * intrinsic.c (make_alias):  Add standard argument. 
index 756ae064e3b3d64a1448b643799c68b26f73a769..ebd5e9eb54c083ce3c40defa513616d7cc920bfb 100644 (file)
@@ -798,6 +798,10 @@ gfc_trans_inquire (gfc_code * code)
     set_string (&block, &post_block, ioparm_delim, ioparm_delim_len,
                p->delim);
 
+  if (p->pad)
+    set_string (&block, &post_block, ioparm_pad, ioparm_pad_len,
+                p->pad); 
+
   if (p->err)
     set_flag (&block, ioparm_err);
 
index f63c8dba206014efd868c4e4b08d916de1e0bec5..f47668b37e7663eaabecde70294e805b18f4b319 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-23  Bud Davis  <bdavis9659@comcast.net>
+
+       PR fortran/19313
+       * gfortan.dg/inquire_6.f90: New test.
+
 2005-01-22  Thomas Koenig  <Thomas.Koenig@online.de>
 
        PR libfortran/19451
diff --git a/gcc/testsuite/gfortran.dg/inquire_6.f90 b/gcc/testsuite/gfortran.dg/inquire_6.f90
new file mode 100644 (file)
index 0000000..7575b6e
--- /dev/null
@@ -0,0 +1,31 @@
+! { dg-do run }
+!pr19313 - inquire(..pad=..)
+      implicit none
+!     logical debug
+!     data debug /.TRUE./
+      character*20 chr
+      chr=''
+!  not connected 
+      inquire(7,pad=chr)
+!     if (debug) print*,chr
+      if (chr.ne.'UNDEFINED') call abort
+      chr=''
+!  not a formatted file
+      open(7,FORM='UNFORMATTED',STATUS='SCRATCH')
+      inquire(7,pad=chr)
+!     if (debug) print*,chr
+      if (chr.ne.'UNDEFINED') call abort
+      chr=''
+! yes
+      open(8,STATUS='SCRATCH',PAD='YES')
+      inquire(8,pad=chr)
+!     if (debug) print*,chr
+      if (chr.ne.'YES') call abort
+      chr=''
+! no
+      open(9,STATUS='SCRATCH',PAD='NO')
+      inquire(9,pad=chr)
+!     if (debug) print*,chr
+      if (chr.ne.'NO') call abort
+      chr=''
+      end