public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "albertm at uphs dot upenn dot edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/22304] New: gfortran silently changes values in equilvanence'd variables
Date: Tue, 05 Jul 2005 05:07:00 -0000	[thread overview]
Message-ID: <20050705050725.22304.albertm@uphs.upenn.edu> (raw)

gfortran(gcc-4.0.0) silently changes the value of variables in equivalence 
statements.  The following code prints the value "0" and not "1": 
 
      implicit none 
      integer O 
      DIMENSION O(300000) 
      COMMON /IBM/O 
      integer b,e,r,s,v,u,w,x,c 
      EQUIVALENCE(O(1),B),(O(2),E),(O(3),R),(O(4),S),(O(5),V),(O(6),U), 
     *(O(7),W),(O(8),X),(C,O(12)) 
 
      O(9)=1 
 
      CALL MYSUB 
      END 
 
      subroutine MYSUB 
      implicit none 
      integer O 
      DIMENSION O(300000) 
      COMMON /IBM/O 
      integer b,e,r,s,v,u,w,x,c 
      EQUIVALENCE(O(1),B),(O(2),E),(O(3),R),(O(4),S),(O(5),V),(O(6),U), 
     *(O(7),W),(O(8),X),(C,O(12)) 
      WRITE(6,*) "IN MYSUB: O(9)= ", O(9) 
      RETURN 
      END 
 
 
As always, thank you.  You folks do excellent work. 
 
Sincerely, 
 Mike Albert

-- 
           Summary: gfortran silently changes values in equilvanence'd
                    variables
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: albertm at uphs dot upenn dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu (AMD)
  GCC host triplet: x86_64-unknown-linux-gnu (AMD)
GCC target triplet: x86_64-unknown-linux-gnu (AMD)


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


             reply	other threads:[~2005-07-05  5:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-05  5:07 albertm at uphs dot upenn dot edu [this message]
2005-07-05  5:33 ` [Bug fortran/22304] " pinskia at gcc dot gnu dot org
2005-07-06  5:09 ` albertm at uphs dot upenn dot edu
2005-07-06 11:32 ` tkoenig at gcc dot gnu dot org
2005-07-06 16:59 ` albertm at uphs dot upenn dot edu
2005-07-06 17:26 ` albertm at uphs dot upenn dot edu
2005-08-03  7:06 ` paulthomas2 at wanadoo dot fr
2005-08-03 15:02 ` albertm at uphs dot upenn dot edu
2005-08-05  5:47 ` pault at gcc dot gnu dot org
2005-08-05  6:08 ` pault at gcc dot gnu dot org
2005-09-09  0:24 ` cvs-commit at gcc dot gnu dot org
2005-09-09  9:07 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:17 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050705050725.22304.albertm@uphs.upenn.edu \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).