This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present


The following program should print twice "T T T T" as if DIM is not present, 1
is assumed.

The standard does not forbid to pass a variable which has the OPTIONAL
attribute to CSHIFT. NAG f95 and ifort print as expected twice "T T T T".

gfortran simply crashes.

program test
 implicit none
 call sub(1)
 call sub()
contains
 subroutine sub(d)
   integer, optional :: d
   print *, cshift([.true.,.true.,.true.,.true.],1,d)
 end subroutine
end program test


-- 
           Summary: CSHIFT: Crash if variable passed to DIM= is not present
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]