[Patch/gfortran] PR16939, 17192,17193,17202,18689,18890 &21297 - redux

Paul Thomas paulthomas2@wanadoo.fr
Fri May 27 19:22:00 GMT 2005


This patch deals with all the issues concerning character pointers, 
assignments of characters and passing array pointers as procedure 
arguments. I believe that the meta-bug 17193 is resolved.  Tabs are 
present in the original patch and will be committed.  (A patch to fix 
PR18109 is on its way - character array initialisers as actual 
arguments.  It has been slowed up by the most general testcase hiting 
other character bugs.  CALL foo ( (/"abcd"/) ) now works fine.)

I have added the test case to check that dependencies are indeed resolved.

I checked that the char[]* temp and its subsequent dereferencing in 
gfc_conv_function_call is still necessary after resolving the problem 
with dependencies.

Fortran changelog entry.

2005-05-27 Paul Thomas <pault@gcc.gnu.org>

    PR fortran/16939
    PR fortran/17192
    PR fortran/17193
    PR fortran/17202
    PR fortran/18689
    PR fortran/18890
    PR fortran/21297
    * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
    length to temp_ss for character pointer array assignments.
    * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
    dereferencing of characters and character pointers.
    * fortran/trans-expr.c (gfc_conv_function_call): Provide string
    length as return argument for various kinds of handling of return.
    Return a char[]* temporary for character pointer functions and
    dereference the temporary upon return.

Testsuite changelog entry.

2005-05-27 Paul Thomas <pault@gcc.gnu.org>

    * gfortran.dg/char_pointer_assign.f90:
    Test character pointer assignments and pointer assignments.
    * gfortran.dg/char_pointer_dummy.f90:
    Test character pointer dummy arguments to procedures.
    * gfortran.dg/char_pointer_func.f90:
    Test character pointer pointer function returns.
    * gfortran.dg/char_pointer_dependency.f90:
    Test character pointer functions with dependencies.

Bootstrapped and regtested on i686/RH9. OK to commit on Sunday if there 
are no adverse comments?

Paul Thomas

Enclosures: patch, character_pointer_assign.f90, 
character_pointer_dependency.f90, character_pointer_dummy.f90 and 
character_pointer_func.f90.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: char_pointer_assign.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050527/469c24ee/attachment.f90>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: char_pointer_func.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050527/469c24ee/attachment-0001.f90>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: char_pointer_dependency.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050527/469c24ee/attachment-0002.f90>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: char_pointer_dummy.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050527/469c24ee/attachment-0003.f90>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050527/469c24ee/attachment.ksh>


More information about the Fortran mailing list