public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35990]  New: run-time abort for MATMUL of run-time zero sized array
@ 2008-04-20 19:28 dick dot hendrickson at gmail dot com
  2008-04-20 19:40 ` [Bug fortran/35990] run-time abort for PACK " burnus at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2008-04-20 19:28 UTC (permalink / raw)
  To: gcc-bugs

Two of the following 4 subroutines abort at run time.  They
have a zero sized array argument to PACK.  If the left and
right hand zero sizes are "the same", it works.  Also works if
the zero size is a compile time thing.

Dick Hendrickson

      program try_gf1048

! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]

      call       gf1048a(  10,  8,  7,  1,  0,  .true.)
      call       gf1048b(  10,  8,  7,  1,  0,  .true.)
      call       gf1048c(  10,  8,  7,  1,  0,  .true.)    !fails
      call       gf1048d(  10,  8,  7,  1,  0,  .true.)    !fails
      end program

      SUBROUTINE GF1048a(nf10,nf8,nf7,nf1,nf0,nf_true)
      logical nf_true
      CHARACTER(9) BDA(10)
      CHARACTER(9) BDA1(10)
      print *, 'gf1048a started'
      BDA(  8:7) = PACK(BDA1( 10:  1), NF_TRUE)
      print *, 'gf1048a finished'
      END SUBROUTINE

      SUBROUTINE GF1048b(nf10,nf8,nf7,nf1,nf0,nf_true)
      logical nf_true
      CHARACTER(9) BDA(10)
      CHARACTER(9) BDA1(nf10)
      print *, 'gf1048b started'
      BDA(NF8:NF7) = PACK(BDA1(NF8:NF7), NF_TRUE)
      print *, 'gf1048b finished'
      END SUBROUTINE

      SUBROUTINE GF1048c(nf10,nf8,nf7,nf1,nf0,nf_true)
!  on windows XP, natters to itself a while and then goes
!  back to command line prompt with no obvious message
      logical nf_true
      CHARACTER(9) BDA(10)
      CHARACTER(9) BDA1(10)
      print *, 'gf1048c started'
      BDA(NF8:NF7) = PACK(BDA1(NF10:NF1), NF_TRUE)
      print *, 'gf1048c finished'
      END SUBROUTINE

      SUBROUTINE GF1048d(nf10,nf8,nf7,nf1,nf0,nf_true)
!  on windows XP, natters to itself a while and then opens
!  a run time error box and offers to send report to MS
      logical nf_true
      CHARACTER(9) BDA(10)
      CHARACTER(9) BDA1(nf10)
      print *, 'gf1048d started'
      BDA(NF8:NF7) = PACK(BDA1(NF10:NF1), NF_TRUE)
      print *, 'gf1048d finished'
      END SUBROUTINE

C:\gfortran:gfortran gf1048.f

C:\gfortran:a
 gf1048a started
 gf1048a finished
 gf1048b started
 gf1048b finished
 gf1048c started

C:\gfortran:gfortran gf1048.f

!  call gf1048c commented out
C:\gfortran:a
 gf1048a started
 gf1048a finished
 gf1048b started
 gf1048b finished
 gf1048d started

C:\gfortran:


-- 
           Summary: run-time abort for MATMUL of run-time zero sized array
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dick dot hendrickson at gmail dot com


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


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

end of thread, other threads:[~2008-05-06 20:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-20 19:28 [Bug fortran/35990] New: run-time abort for MATMUL of run-time zero sized array dick dot hendrickson at gmail dot com
2008-04-20 19:40 ` [Bug fortran/35990] run-time abort for PACK " burnus at gcc dot gnu dot org
2008-04-23  5:58 ` tkoenig at gcc dot gnu dot org
2008-04-23 20:33 ` tkoenig at gcc dot gnu dot org
2008-05-03 21:09 ` tkoenig at gcc dot gnu dot org
2008-05-04  8:07 ` tkoenig at gcc dot gnu dot org
2008-05-04  9:04 ` tkoenig at gcc dot gnu dot org
2008-05-04 10:00 ` dominiq at lps dot ens dot fr
2008-05-04 10:16 ` tkoenig at netcologne dot de
2008-05-04 10:16 ` tkoenig at gcc dot gnu dot org
2008-05-06 20:48 ` tkoenig at gcc dot gnu dot org
2008-05-06 20:50 ` tkoenig 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).