This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51991] Wrong error message with variables named "SAVE*"
- From: "bardeau at iram dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jan 2012 13:19:21 +0000
- Subject: [Bug fortran/51991] Wrong error message with variables named "SAVE*"
- Auto-submitted: auto-generated
- References: <bug-51991-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51991
--- Comment #5 from Sebastien Bardeau <bardeau at iram dot fr> 2012-01-25 13:19:21 UTC ---
(In reply to comment #4)
> > Well, ok, the 2 tests are just different and should raise different errors.
>
> Your original test gives
>
> pr51991.f90:11.11:
>
> j = a%j
> 1
> Error: 'j' at (1) is not a member of the 'mytyp' structure
>
> for 4.4, 4.5, 4.6, and trunk.
Ok. Not sure what goes wrong, but I do observe the error reported in my first
message with gfortran trunk (I am using gfortran precompiled binaries, and
dependencies compiled by myself a while ago). I run gfortran under Scientific
Linux 5.5.
home/bardeau> uname -a
Linux pctcp27 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 16:05:53 EDT 2010 x86_64
x86_64 x86_64 GNU/Linux
Scripts/Fortran> gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/bardeau/Softs/gcc-4.7.0-20120125/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk-source/gcc/configure
--enable-languages=c,c++,fortran --enable-checking=release --disable-bootstrap
--disable-libmudflap --enable-libgomp --enable-lto --enable-gold
--with-plugin-ld=/usr/bin/gold --prefix=/usr/local/gcc-trunk
Thread model: posix
gcc version 4.7.0 20120125 (experimental) [trunk revision 183507] (GCC)
Scripts/Fortran> cat gfortran-error1.f90
module mymod
type :: mytyp
integer :: i
end type mytyp
contains
subroutine mysub
implicit none
type(mytyp) :: a
integer :: savei,savej
savei = a%i
savej = a%j
end subroutine mysub
end module mymod
Scripts/Fortran> gfortran -c gfortran-error1.f90
gfortran-error1.f90:11.9:
savej = a%j
1
Error: Syntax error in SAVE statement at (1)