public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24100] gfortran cannot compile data statement
  2005-09-28  7:59 [Bug fortran/24100] New: gfortran cannot compile data statement federico dot carminati at cern dot ch
@ 2005-09-28  7:59 ` federico dot carminati at cern dot ch
  2005-09-28 13:24 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: federico dot carminati at cern dot ch @ 2005-09-28  7:59 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alfredo dot ferrari at cern
                   |                            |dot ch


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


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

* [Bug fortran/24100] New: gfortran cannot compile data statement
@ 2005-09-28  7:59 federico dot carminati at cern dot ch
  2005-09-28  7:59 ` [Bug fortran/24100] " federico dot carminati at cern dot ch
  2005-09-28 13:24 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: federico dot carminati at cern dot ch @ 2005-09-28  7:59 UTC (permalink / raw)
  To: gcc-bugs

Not sure whether this is in the standard or an extentions to it, but it works with all fortran compilers I 
have access to and it fails with gfortran

$ cat > bug.f <<EOF
      program bug
      parameter (maxdim=5)
      dimension a(maxdim,maxdim)
      data ((a(j,k),k=1,j),j=1,maxdim) /
     +  1,  2,  3,  4,  5,  6,  7,  8,  
     +  9, 10, 11, 12, 13, 14, 15 /
      character*20 fmt
*
      write(fmt,'(''('',i2.2,''(1x,f5.2))'')') maxdim
      do j=1,maxdim
         print fmt, (a(j,k),k=1,maxdim)
      enddo
      end
EOF

$ gfortran -o bug bug.f
In file bug.f:4

      data ((a(j,k),k=1,j),j=1,maxdim) /                                
                       1
Error: Variable 'j' at (1) cannot appear in an initialization expression

-- 
           Summary: gfortran cannot compile data statement
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: federico dot carminati at cern dot ch
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: Darwin 8.2.0 powerpc


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


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

* [Bug fortran/24100] gfortran cannot compile data statement
  2005-09-28  7:59 [Bug fortran/24100] New: gfortran cannot compile data statement federico dot carminati at cern dot ch
  2005-09-28  7:59 ` [Bug fortran/24100] " federico dot carminati at cern dot ch
@ 2005-09-28 13:24 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-28 13:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-28 13:24 -------


*** This bug has been marked as a duplicate of 23232 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-09-28 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-28  7:59 [Bug fortran/24100] New: gfortran cannot compile data statement federico dot carminati at cern dot ch
2005-09-28  7:59 ` [Bug fortran/24100] " federico dot carminati at cern dot ch
2005-09-28 13:24 ` 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).