From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27808 invoked by alias); 25 Jan 2012 13:20:31 -0000 Received: (qmail 27795 invoked by uid 22791); 25 Jan 2012 13:20:30 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Jan 2012 13:20:17 +0000 From: "bardeau at iram dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/51991] Wrong error message with variables named "SAVE*" Date: Wed, 25 Jan 2012 13:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: bardeau at iram dot fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg02921.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51991 --- Comment #5 from Sebastien Bardeau 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)