[Bug fortran/25086] Pointer valued assumed length character function allowed

pault at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jan 26 20:19:00 GMT 2006



------- Comment #2 from pault at gcc dot gnu dot org  2006-01-26 20:19 -------
Subject: Bug 25086

Author: pault
Date: Thu Jan 26 20:19:09 2006
New Revision: 110269

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110269
Log:
2005-01-26  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/25964
        * resolve.c (resolve_function): Exclude statement functions from
        global reference checking.

        PR fortran/25084
        PR fortran/20852
        PR fortran/25085
        PR fortran/25086
        * resolve.c (resolve_function): Declare a gfc_symbol to replace the
        references through the symtree to the symbol associated with the
        function expresion. Give error on reference to an assumed character
        length function is defined in an interface or an external function
        that is not a dummy argument.
        (resolve_symbol): Give error if an assumed character length function
        is array-valued, pointer-valued, pure or recursive. Emit warning
        that character(*) value functions are obsolescent in F95.

        PR fortran/25416
        * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
        prevents any assumed character length function call from getting here
        except intrinsics such as SPREAD. In this case, ensure that no
        segfault occurs from referencing non-existent charlen->length->
        expr_type and provide a backend_decl for the charlen from the charlen
        of the first actual argument.

        Cure temp name confusion.
        * trans-expr.c (gfc_get_interface_mapping_array): Change name of
        temporary from "parm" to "ifm" to avoid clash with temp coming from
        trans-array.c.

2005-01-26  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/25964
        * gfortran.dg/global_references_2.f90: New test.

        PR fortran/25084
        PR fortran/20852
        PR fortran/25085
        PR fortran/25086
        * gfortran.dg/assumed_charlen_function_1.f90: New test.
        * gfortran.dg/assumed_charlen_function_3.f90: New test.

        PR fortran/25416
        * gfortran.dg/assumed_charlen_function_2.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f90
    trunk/gcc/testsuite/gfortran.dg/assumed_charlen_function_2.f90
    trunk/gcc/testsuite/gfortran.dg/assumed_charlen_function_3.f90
    trunk/gcc/testsuite/gfortran.dg/global_references_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25086



More information about the Gcc-bugs mailing list