From f8f35c46544d75e933877db28035221fa66fa7ea Mon Sep 17 00:00:00 2001 From: domob Date: Mon, 25 Aug 2008 17:58:53 +0000 Subject: 2008-08-25 Daniel Kraft * gfortran.h (gfc_find_component): Add new arguments. * parse.c (parse_derived_contains): Check if the derived-type containing the CONTAINS section is SEQUENCE/BIND(C). * resolve.c (resolve_typebound_procedure): Check for name collision with components. (resolve_fl_derived): Check for name collision with inherited type-bound procedures. * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'. (gfc_add_component): Adapt for new arguments. * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto. 2008-08-25 Daniel Kraft * gfortran.dg/extends_7.f03: New test. * gfortran.dg/typebound_proc_7.f03: New test. * gfortran.dg/typebound_proc_8.f03: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139566 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/primary.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gcc/fortran/primary.c') diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 4865b7584a2..5d734079d7a 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1757,7 +1757,7 @@ match_varspec (gfc_expr *primary, int equiv_flag) if (m != MATCH_YES) return MATCH_ERROR; - component = gfc_find_component (sym, name); + component = gfc_find_component (sym, name, false, false); if (component == NULL) return MATCH_ERROR; @@ -2096,7 +2096,7 @@ gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result, bool parent where = gfc_current_locus; - gfc_find_component (sym, NULL); + gfc_find_component (sym, NULL, false, true); /* Match the component list and store it in a list together with the corresponding component names. Check for empty argument list first. */ @@ -2149,13 +2149,15 @@ gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result, bool parent strncpy (comp_tail->name, comp->name, GFC_MAX_SYMBOL_LEN + 1); } - /* Find the current component in the structure definition and check its - access is not private. */ + /* Find the current component in the structure definition and check + its access is not private. */ if (comp) - this_comp = gfc_find_component (sym, comp->name); + this_comp = gfc_find_component (sym, comp->name, false, false); else { - this_comp = gfc_find_component (sym, (const char *)comp_tail->name); + this_comp = gfc_find_component (sym, + (const char *)comp_tail->name, + false, false); comp = NULL; /* Reset needed! */ } -- cgit v1.2.1