diff options
author | domob <domob@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-25 17:58:53 +0000 |
---|---|---|
committer | domob <domob@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-25 17:58:53 +0000 |
commit | f8f35c46544d75e933877db28035221fa66fa7ea (patch) | |
tree | 48f2f28391f6447501ac0481370dfd5b4e376e7c /gcc/fortran/primary.c | |
parent | be30e9d9a86c62a51de7135cdf35dd6f0c948cdc (diff) | |
download | gcc-f8f35c46544d75e933877db28035221fa66fa7ea.tar.gz |
2008-08-25 Daniel Kraft <d@domob.eu>
* 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 <d@domob.eu>
* 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
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 14 |
1 files changed, 8 insertions, 6 deletions
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! */ } |