aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/symbol.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2008-09-17 22:23:51 +0000
committerPaul Thomas <pault@gcc.gnu.org>2008-09-17 22:23:51 +0000
commit0b4e2af765d06ef7a49b7ad75cd205ea7c665819 (patch)
tree4541f82a616fe793fb7f6ddd9ad66a7cad888b0f /gcc/fortran/symbol.c
parentc0b290997fa10dd3978c43c1dcdef8838fb15e98 (diff)
downloadgcc-0b4e2af765d06ef7a49b7ad75cd205ea7c665819.zip
gcc-0b4e2af765d06ef7a49b7ad75cd205ea7c665819.tar.gz
gcc-0b4e2af765d06ef7a49b7ad75cd205ea7c665819.tar.bz2
re PR fortran/37274 ([Regression on 4.3?] error: type name is ambiguous.)
2008-09-18 Paul Thomas <pault@gcc.gnu.org> PR fortran/37274 PR fortran/36374 * module.c (check_for_ambiguous): New function to test loaded symbol for ambiguity with fixup symbol. (read_module): Call check_for_ambiguous. (write_symtree): Do not write the symtree for symbols coming from an interface body. PR fortran/36374 * resolve.c (count_specific_procs ): New function to count the number of specific procedures with the same name as the generic and emit appropriate errors for and actual argument reference. (resolve_assumed_size_actual): Add new argument no_formal_args. Correct logic around passing generic procedures as arguments. Call count_specific_procs from two locations. (resolve_function): Evaluate and pass no_formal_args. (resolve call): The same and clean up a bit by using csym more widely. PR fortran/36454 * symbol.c (gfc_add_access): Access can be updated if use associated and not private. 2008-09-18 Paul Thomas <pault@gcc.gnu.org> PR fortran/37274 * gfortran.dg/used_types_22.f90: New test. * gfortran.dg/used_types_23.f90: New test. PR fortran/36374 * gfortran.dg/generic_17.f90: New test. * gfortran.dg/ambiguous_specific_2.f90: New test. * gfortran.dg/generic_actual_arg.f90: Add test for case that is not ambiguous. PR fortran/36454 * gfortran.dg/access_spec_3.f90: New test. From-SVN: r140434
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r--gcc/fortran/symbol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 905b243..37f07df 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -1446,7 +1446,8 @@ gfc_add_access (symbol_attribute *attr, gfc_access access,
const char *name, locus *where)
{
- if (attr->access == ACCESS_UNKNOWN)
+ if (attr->access == ACCESS_UNKNOWN
+ || (attr->use_assoc && attr->access != ACCESS_PRIVATE))
{
attr->access = access;
return check_conflict (attr, name, where);