From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1087 invoked by alias); 12 Jan 2005 12:43:24 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 691 invoked by uid 48); 12 Jan 2005 12:43:07 -0000 Date: Wed, 12 Jan 2005 12:43:00 -0000 From: "Thomas dot Koenig at online dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20050112124305.19394.Thomas.Koenig@online.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug fortran/19394] New: g77: confused equivalences not detected X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg01501.txt.bz2 List-Id: $ cat confused-equivalences.f real a(2), b(2), c(3) equivalence (a(1), b(2)), (b(1), c(1)), (c(2), a(2)) end $ g77 confused-equivalences.f $ g77 -v Reading specs from /usr/lib/gcc-lib/ia64-redhat-linux/3.2.3/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=ia64-redhat-linux Thread model: posix gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-49) If one of the variables is put into common, then an error is indeed generated: $ cat confused-equivalences+common.f real a(2), b(2), c(3) common c equivalence (a(1), b(2)), (b(1), c(1)), (c(2), a(2)) end $ g77 confused-equivalences+common.f Mismatched EQUIVALENCE requirements for placement of `a' at both 4 and 0 bytes offset from `_BLNK__' gfortran gets this right, which is nice: $ gfortran confused-equivalences.f In file confused-equivalences.f:1 real a(2), b(2), c(3) 2 1 Error: Inconsistent equivalence rules involving 'b' at (1) and 'a' at (2) Maybe this could be turned into a test case. -- Summary: g77: confused equivalences not detected Product: gcc Version: 3.2.3 Status: UNCONFIRMED Severity: minor Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Thomas dot Koenig at online dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19394