diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-08-14 14:33:54 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-08-14 14:33:54 +0000 |
commit | 5321ffedee1b4e05b7fa56cab64c595516fd9533 (patch) | |
tree | ffda4ecce65bb72e54a07d8ed2c09288fa207b43 /gcc/fortran/resolve.c | |
parent | b31856d3ac23cf3dab1e95cb96230dc81564c84a (diff) | |
download | gcc-hsa.tar.gz |
Merged trunk revision 251080 into the hsa branchhsa
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/hsa@251093 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 5caf76761ee..30928a2ac2d 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -14397,17 +14397,18 @@ resolve_symbol (gfc_symbol *sym) } } - /* If the symbol is marked as bind(c), verify it's type and kind. Do not - do this for something that was implicitly typed because that is handled - in gfc_set_default_type. Handle dummy arguments and procedure - definitions separately. Also, anything that is use associated is not - handled here but instead is handled in the module it is declared in. - Finally, derived type definitions are allowed to be BIND(C) since that - only implies that they're interoperable, and they are checked fully for - interoperability when a variable is declared of that type. */ - if (sym->attr.is_bind_c && sym->attr.implicit_type == 0 && - sym->attr.use_assoc == 0 && sym->attr.dummy == 0 && - sym->attr.flavor != FL_PROCEDURE && sym->attr.flavor != FL_DERIVED) + /* If the symbol is marked as bind(c), that it is declared at module level + scope and verify its type and kind. Do not do the latter for symbols + that are implicitly typed because that is handled in + gfc_set_default_type. Handle dummy arguments and procedure definitions + separately. Also, anything that is use associated is not handled here + but instead is handled in the module it is declared in. Finally, derived + type definitions are allowed to be BIND(C) since that only implies that + they're interoperable, and they are checked fully for interoperability + when a variable is declared of that type. */ + if (sym->attr.is_bind_c && sym->attr.use_assoc == 0 + && sym->attr.dummy == 0 && sym->attr.flavor != FL_PROCEDURE + && sym->attr.flavor != FL_DERIVED) { bool t = true; @@ -14421,11 +14422,11 @@ resolve_symbol (gfc_symbol *sym) "module level scope", sym->name, &(sym->declared_at)); t = false; } - else if (sym->common_head != NULL) + else if (sym->common_head != NULL && sym->attr.implicit_type == 0) { t = verify_com_block_vars_c_interop (sym->common_head); } - else + else if (sym->attr.implicit_type == 0) { /* If type() declaration, we need to verify that the components of the given type are all C interoperable, etc. */ |