This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,fortran]: proposed fix for PR 32732
- From: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- To: "Christopher D. Rickett" <crickett at lanl dot gov>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 Jul 2007 23:01:20 +0200
- Subject: Re: [PATCH,fortran]: proposed fix for PR 32732
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