[Bug fortran/49693] Spurious unused-variable warnings for COMMON block module variables.

2012-01-04 Thread harald at klimachs dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49693

--- Comment #7 from Harald Klimach harald at klimachs dot de 2012-01-04 
18:41:08 UTC ---
Thanks a lot!
Just ran the gcc trunk over my code, and the annoying warnings are gone.


[Bug fortran/49693] Spurious unused-variable warnings for COMMON block module variables.

2011-12-29 Thread harald at klimachs dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49693

Harald Klimach harald at klimachs dot de changed:

   What|Removed |Added

 CC||harald at klimachs dot de

--- Comment #2 from Harald Klimach harald at klimachs dot de 2011-12-30 
00:12:07 UTC ---
Just also want to confirm this, I get the same messages with the mpi module of
openmpi. And I wanted to add, that these messages even persist, if I use an
only clause in the use mpi statement.


[Bug fortran/47583] [4.6 Regression] Inquire affected by previous read

2011-02-08 Thread harald at klimachs dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47583

--- Comment #12 from Harald Klimach harald at klimachs dot de 2011-02-09 
06:37:02 UTC ---
(In reply to comment #11)

Thanks a lot for taking the time to properly incorporate the fix!


[Bug fortran/47583] [4.6 Regression] Inquire affected by previous read

2011-02-02 Thread harald at klimachs dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47583

--- Comment #6 from Harald Klimach harald at klimachs dot de 2011-02-02 
08:04:30 UTC ---
(In reply to comment #5)
Thanks a lot, at least for me this patch seems to solve the problem.


[Bug fortran/47583] New: Inquire affected by previous read

2011-02-01 Thread harald at klimachs dot de
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: unassig...@gcc.gnu.org
ReportedBy: har...@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.


[Bug fortran/47583] [4.6 Regression] Inquire affected by previous read

2011-02-01 Thread harald at klimachs dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47583

--- Comment #3 from Harald Klimach harald at klimachs dot de 2011-02-02 
06:04:07 UTC ---
The problem also exists with scalars and integers instead of reals.


[Bug fortran/47583] [4.6 Regression] Inquire affected by previous read

2011-02-01 Thread harald at klimachs dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47583

--- Comment #4 from Harald Klimach harald at klimachs dot de 2011-02-02 
06:14:58 UTC ---
Further reduced test case:


subroutine input()
   read(*,*)
end subroutine input

subroutine abc(sizedat)
   integer, intent(in) :: sizedat
   integer :: rl
   inquire(iolength=rl) sizedat
end subroutine abc

(now tested with gcc version 4.6.0 20110201 (experimental) [trunk revision
169504] (GCC) on Linux)