Bug 19313 - inquire(pad=) not implemented
Summary: inquire(pad=) not implemented
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2005-01-07 15:05 UTC by Thomas Koenig
Modified: 2005-01-23 15:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-01-07 15:31:43


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2005-01-07 15:05:19 UTC
$ cat pad.f
      character*20 chr
      open(7)
      inquire(7,pad=chr)
      print *,chr
      end
$ gfortran pad.f && ./a.out

$ gfortran -v ; gfortran -dumpmachine
Using built-in specs.
Configured with: ../gcc-4.0-20050102/configure --prefix=/home/zfkts
--enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20050102 (experimental)
ia64-unknown-linux-gnu

This is not a g77 regression. g77 does not support pad= in inquire.
Comment 1 Andrew Pinski 2005-01-07 15:31:42 UTC
This is partly a front-end bug:
  _gfortran_filename = "t.f";
  _gfortran_line = 3;
  _gfortran_ioparm.unit = 7;
  _gfortran_st_inquire ();

And a library bug.
Comment 2 Thomas Koenig 2005-01-07 15:40:40 UTC
inquire (delim= ) also doesn't work (returns blanks).
Comment 3 Bud Davis 2005-01-18 13:10:17 UTC
patch here:

http://gcc.gnu.org/ml/fortran/2005-01/msg00207.html
Comment 4 GCC Commits 2005-01-23 14:20:06 UTC
Subject: Bug 19313

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bdavis@gcc.gnu.org	2005-01-23 14:19:55

Modified files:
	gcc/fortran    : ChangeLog trans-io.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: inquire_6.f90 

Log message:
	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.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.309&r2=1.310
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-io.c.diff?cvsroot=gcc&r1=1.27&r2=1.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4926&r2=1.4927
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/inquire_6.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 5 Andrew Pinski 2005-01-23 15:47:37 UTC
Fixed.