[PATCH,fortran]: proposed fix for PR 32732
Christopher D. Rickett
crickett@lanl.gov
Thu Jul 19 19:21:00 GMT 2007
hi all,
would it be possible to apply the patch i proposed for PR 32732 for the
BIND(C) case before fixing the non-bind(c) case? i don't think my patch
for PR 32732 causes the problem illustrated below.
thanks.
Chris
On Wed, 18 Jul 2007, Tobias Burnus wrote:
> Hi Chris, hi all,
>
> The gcc/fortran/trans-decl.c part seems to be ok.
>
> However, could you modify the gcc/fortran/trans-expr.c fix such that it
> works also in the non BIND(C) case; VALUE is not restricted to Bind(c).
>
> *************************************
> program test
> implicit none
> character(len=13) :: chr
> chr = 'Fortran '
> call sub1(chr)
> if(chr /= 'Fortran ') call abort()
> contains
> subroutine sub1(a)
> character(len=13), VALUE :: a
> a = trim(a)//" rules"
> call sub2(a) ! WRONG: sub2 (&a, 13);
> end subroutine sub1
> subroutine sub2(a)
> character(len=13), VALUE :: a
> print *, a ! PRINTS GARBAGE
> if(a /= 'Fortran rules') call abort()
> end subroutine sub2
> end program test
> *************************************
>
> Do you have actually a SVN account or not yet?
>
> Tobias
>
More information about the Fortran
mailing list