public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/22304] New: gfortran silently changes values in equilvanence'd variables
@ 2005-07-05  5:07 albertm at uphs dot upenn dot edu
  2005-07-05  5:33 ` [Bug fortran/22304] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: albertm at uphs dot upenn dot edu @ 2005-07-05  5:07 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-09-09 22:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-05  5:07 [Bug fortran/22304] New: gfortran silently changes values in equilvanence'd variables albertm at uphs dot upenn dot edu
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

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).