[PATCH, fortran] character length (PR fortran/21730)

David Edelsohn dje@watson.ibm.com
Wed Jul 13 18:56:00 GMT 2005


>>>>> Steve Kargl writes:

Steve> Do you have a testcase that fails without this patch?

	An example of the failure was reported in the PR

$ cat a.f
      character*2 a
      character*4 b
      character*4 c
      parameter(a="12")
      parameter (b = a)
      c = a
      write (*, '("#",A,"#")') b
      write (*, '("#",A,"#")') c
      end
$ ./a.out 
#12#
#12  #

	I converted that to a gfortran testsuite testcase, again in the PR

! PR fortran/21730
! {do-do run}
        character*2 a
        character*4 b
        character*6 c
        parameter (a="12")
        parameter (b = a)
        write (c,'("#",A,"#")') b
        if (c .ne. '#12  #') call abort
        end

David



More information about the Fortran mailing list