[PATCH,fortran]: proposed fix for PR 32732
Christopher D. Rickett
crickett@lanl.gov
Wed Jul 18 21:09:00 GMT 2007
hi Tobias,
i'll try fixing the non-bind(c) case. i didn't know the non-bind(c) case
wasn't working and i didn't feel comfortable changing the VALUE handling
for non-bind(c) since that wasn't my work.
also, i have not yet submitted for an svn account. i believe it said i
need a sponsor?
thanks for the quick feedback.
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