This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2007 09:39:46 -0000
- Subject: [Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
- References: <bug-33317-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from dominiq at lps dot ens dot fr 2007-10-25 09:39 -------
On Darwin with revision 129623, the orginal code gives:
pr33317.f90:8.51:
print *, cshift([.true.,.true.,.true.,.true.],1,d)
1
Error: 'dim' argument of 'cshift' intrinsic at (1) must not be OPTIONAL
while
program test
implicit none
call sub(1)
call sub()
contains
subroutine sub(d)
integer, optional :: d
if (present(d)) then
print *, eoshift((/.true.,.true.,.true.,.true./),1,d)
else
print *, eoshift((/.true.,.true.,.true.,.true./),1)
end if
end subroutine
end program test
ICE with:
pr33317_db_1.f90:9.61:
print *, eoshift((/.true.,.true.,.true.,.true./),1,dim=d)
1
pr33317_db_1.f90:0: internal compiler error: Bus error
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33317