public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47583] New: Inquire affected by previous read
@ 2011-02-01 21:53 harald at klimachs dot de
  2011-02-01 22:17 ` [Bug fortran/47583] " kargl at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: harald at klimachs dot de @ 2011-02-01 21:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47583

           Summary: Inquire affected by previous read
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: harald@klimachs.de


Created attachment 23205
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23205
Minimal example

The use of inquire seems to be affected by a previous read, in the same file,
even if in a totally different scope. Attached is a minimal module illustrating
this.

There is a subroutine, reading some data unformatted, followed by another one
which inquires the IO length of an array with intent(in).

Compilation results in the following output:

gfortran-mp-4.6 -v -save-temps -c testinquire.f90 
Using built-in specs.
COLLECT_GCC=gfortran-mp-4.6
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin10/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10
Configured with: ../gcc-4.6-20110108/configure --prefix=/opt/local
--build=x86_64-apple-darwin10 --libdir=/opt/local/lib/gcc46
--includedir=/opt/local/include/gcc46 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.6
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-4.6 --with-gxx-include-dir=/opt/local/include/gcc46/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--enable-stage1-checking --disable-multilib --enable-fully-dynamic-string
--enable-languages=c,c++,objc,obj-c++,fortran
Thread model: posix
gcc version 4.6.0 20110108 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.6.6' '-v' '-save-temps' '-c'
'-mtune=core2'
 /opt/local/libexec/gcc/x86_64-apple-darwin10/4.6.0/f951 testinquire.f90 -fPIC
-quiet -dumpbase testinquire.f90 -mmacosx-version-min=10.6.6 -mtune=core2
-auxbase testinquire -version -fintrinsic-modules-path
/opt/local/lib/gcc46/gcc/x86_64-apple-darwin10/4.6.0/finclude -o testinquire.s
GNU Fortran (GCC) version 4.6.0 20110108 (experimental) (x86_64-apple-darwin10)
    compiled by GNU C version 4.6.0 20110108 (experimental), GMP version 5.0.1,
MPFR version 3.0.0-p8, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran (GCC) version 4.6.0 20110108 (experimental) (x86_64-apple-darwin10)
    compiled by GNU C version 4.6.0 20110108 (experimental), GMP version 5.0.1,
MPFR version 3.0.0-p8, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
testinquire.f90:20.25:

     inquire(iolength=rl) sizedat
                         1
Error: Dummy argument 'sizedat' with INTENT(IN) in variable definition context
(item in READ) at (1)


If the order of the subroutines is changed, that is, if the read appears after
the inquire statement, the code is compiled as expected.

At least in gfortran 4.4 this issue was not present.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-02-09 15:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 21:53 [Bug fortran/47583] New: Inquire affected by previous read harald at klimachs dot de
2011-02-01 22:17 ` [Bug fortran/47583] " kargl at gcc dot gnu.org
2011-02-02  3:09 ` [Bug fortran/47583] [4.6 Regression] " jvdelisle at gcc dot gnu.org
2011-02-02  6:04 ` harald at klimachs dot de
2011-02-02  6:15 ` harald at klimachs dot de
2011-02-02  7:12 ` jpr at csc dot fi
2011-02-02  8:04 ` harald at klimachs dot de
2011-02-02 10:03 ` jakub at gcc dot gnu.org
2011-02-02 12:48 ` jpr at csc dot fi
2011-02-03  5:36 ` pault at gcc dot gnu.org
2011-02-09  5:31 ` jvdelisle at gcc dot gnu.org
2011-02-09  6:12 ` jvdelisle at gcc dot gnu.org
2011-02-09  6:37 ` jvdelisle at gcc dot gnu.org
2011-02-09  7:05 ` harald at klimachs dot de
2011-02-09 15:48 ` jvdelisle at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).