This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/30096] [4.1 and 4.2 only] Interface bug: gfortran falsely detect ambigious interface, scoping problem?



------- Comment #7 from pault at gcc dot gnu dot org  2006-12-21 15:05 -------
Subject: Bug 30096

Author: pault
Date: Thu Dec 21 15:05:24 2006
New Revision: 120113

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120113
Log:
2006-12-21  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/29975
        PR fortran/30068
        PR fortran/30096
        * interface.c (compare_type_rank_if): Reject invalid generic
        interfaces.
        (check_interface1): Give a warning for nonreferred to ambiguous
        interfaces.
        (check_sym_interfaces): Check whether an ambiguous interface is
        referred to.  Do not check host associated interfaces since these
        cannot be ambiguous with the local versions.
        (check_uop_interface, gfc_check_interfaces): Update call to
        check_interface1.
        * symbol.c (gfc_get_sym_tree, gfc_get_sym_tree): Allow adding
        unambiguous procedures to generic interfaces.
        * gfortran.h (symbol_attribute): Added use_only and
        ambiguous_interfaces.
        * module.c (load_need): Set the use_only flag, if needed.
        * resolve.c (resolve_fl_procedure): Warn for nonreferred
        interfaces.
        * expr.c (find_array_section): Fix initializer array contructor.


2006-12-21  Paul Thomas  <pault@gcc.gnu.org>
            Tobias Burnus  <burnus@gcc.gnu.org>

        PR fortran/29975
        PR fortran/30068
        * gfortran.dg/interface_4.f90: Test adding procedure to generic
        interface.
        * gfortran.dg/interface_5.f90: Test warning for not-referenced-to
        ambiguous interfaces.
        * gfortran.dg/interface_6.f90: Test invalid, ambiguous interface.
        * gfortran.dg/interface_7.f90: Test invalid, ambiguous interface.
        * gfortran.dg/interface_8.f90: Test warning for not-referenced-to
        ambiguous interfaces.
        * gfortran.dg/interface_1.f90: Change dg-error into a dg-warning.
        * gfortran.dg/array_initializer_2.f90: Add initializer array
        constructor test.

        PR fortran/30096
        * gfortran.dg/interface_9.f90: Test that host interfaces are
        not checked for ambiguity with the local version.


Added:
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_4.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_5.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_6.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_7.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_8.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_9.f90
Modified:
    branches/gcc-4_2-branch/gcc/fortran/ChangeLog
    branches/gcc-4_2-branch/gcc/fortran/expr.c
    branches/gcc-4_2-branch/gcc/fortran/gfortran.h
    branches/gcc-4_2-branch/gcc/fortran/interface.c
    branches/gcc-4_2-branch/gcc/fortran/module.c
    branches/gcc-4_2-branch/gcc/fortran/resolve.c
    branches/gcc-4_2-branch/gcc/fortran/symbol.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/array_initializer_2.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/generic_7.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_1.f90


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]