This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2007 20:59:44 -0000
- Subject: [Bug fortran/33317] New: CSHIFT: Crash if variable passed to DIM= is not present
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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