This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30865] New: optional argument passed on to size(...,dim=)
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2007 22:14:36 -0000
- Subject: [Bug fortran/30865] New: optional argument passed on to size(...,dim=)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following is legal (see
<7dpCh.29496$5j1.2977@bgtnsc04-news.ops.worldnet.att.net>), but we segfault
on execution:
$ cat size.f90
module foo
contains
subroutine checkv(ires,a1,opt1)
integer :: a1(:,:)
integer, optional :: opt1
ires = size (a1, dim=opt1)
end subroutine checkv
end module foo
program main
use foo
implicit none
integer :: a(2,3)
integer :: ires
call checkv (ires, a)
print *,ires
call checkv (ires, a, 1)
print *,ires
end program main
$ gfortran size.f90
$ ./a.out
Segmentation fault
--
Summary: optional argument passed on to size(...,dim=)
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: tkoenig at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30865
- Follow-Ups:
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: pault at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: pault at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: burnus at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: burnus at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: pault at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: pault at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: pault at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: kargl at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: tkoenig at gcc dot gnu dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: patchapp at dberlin dot org
- [Bug fortran/30865] optional argument passed on to size(...,dim=)
- From: tkoenig at gcc dot gnu dot org
- [Bug fortran/30865] [4.1, 4.2 only] optional argument passed on to size(...,dim=)
- From: burnus at gcc dot gnu dot org
- [Bug fortran/30865] [4.1, 4.2 only] optional argument passed on to size(...,dim=)
- From: burnus at gcc dot gnu dot org
- [Bug fortran/30865] [4.1, 4.2 only] optional argument passed on to size(...,dim=)
- From: burnus at gcc dot gnu dot org