This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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 with optional argument


Compiling the source

module print_array_mod
implicit none
private
public  :: print_sub
integer, private, parameter :: istd_output = 6
contains
subroutine print_sub(labels,fmt_labels,fmt_header)
character (len=*)  , intent(in)           :: labels(:)
character (len=*)  , intent(in)           ::
fmt_labels
character (len=*)  , intent(in), optional ::
fmt_header
if (present(fmt_header)) then
   if (fmt_header /= "") write
(istd_output,fmt_header)
end if
write (istd_output,fmt_labels) labels
end subroutine print_sub
end module print_array_mod

with gfortran 
gcc version 4.2.0 20051126 (experimental)

with the default options on Windows XP

gives the error message

print_array_gfort.f90: In function 'print_sub':
print_array_gfort.f90:11: internal compiler error:
tree check: expected integer_cst, have plus_expr in
gfc_trans_transfer, at fortran/trans-io.c:1804

If someone confirms this bug and/or enters it in
bugzilla, please inform me. Thanks.

Vivek Rao


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