diff options
author | Christopher D. Rickett <crickett@lanl.gov> | 2007-08-22 21:28:08 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-08-22 23:28:08 +0200 |
commit | aa2f6edbf74131aff10dae81dab928b3ddbb307e (patch) | |
tree | a40c16b3d5f5ed186bfbe426cb793d8f1fe8d75a /gcc/fortran | |
parent | 129d15a3e011dd6f48865673f70396a957c4deff (diff) | |
download | gcc-aa2f6edbf74131aff10dae81dab928b3ddbb307e.zip gcc-aa2f6edbf74131aff10dae81dab928b3ddbb307e.tar.gz gcc-aa2f6edbf74131aff10dae81dab928b3ddbb307e.tar.bz2 |
re PR fortran/33020 (Bind(C): c_f_pointer: type/rank mismatch error with integer(8) SHAPE)
2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/33020
* resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
kind for optional SHAPE parameter of C_F_POINTER.
2007-08-22 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/33020
* gfortran.dg/c_f_pointer_shape_tests_2.f03: Update test to
include multiple kinds for SHAPE parameter within a single
namespace.
* gfortran.dg/c_f_pointer_shape_tests_2_driver.c: Ditto.
* gfortran.dg/c_f_pointer_shape_tests_3.f03: New test case.
From-SVN: r127719
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 346e811..ae7145d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2007-08-22 Christopher D. Rickett <crickett@lanl.gov> + + PR fortran/33020 + * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and + kind for optional SHAPE parameter of C_F_POINTER. + 2007-08-22 Janus Weil <jaydub66@gmail.com> * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c. diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index ae15d16..fbb7a03 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -2351,11 +2351,6 @@ gfc_iso_c_sub_interface (gfc_code *c, gfc_symbol *sym) formal args) before resolving. */ gfc_procedure_use (sym, &c->ext.actual, &(c->loc)); - /* Give the optional SHAPE formal arg a type now that we've done our - initial checking against the actual. */ - if (sym->intmod_sym_id == ISOCBINDING_F_POINTER) - sym->formal->next->next->sym->ts.type = BT_INTEGER; - if ((sym->intmod_sym_id == ISOCBINDING_F_POINTER) || (sym->intmod_sym_id == ISOCBINDING_F_PROCPOINTER)) { @@ -2396,13 +2391,6 @@ gfc_iso_c_sub_interface (gfc_code *c, gfc_symbol *sym) /* the 1 means to add the optional arg to formal list */ new_sym = get_iso_c_sym (sym, name, binding_label, 1); - /* Set the kind for the SHAPE array to that of the actual - (if given). */ - if (c->ext.actual != NULL && c->ext.actual->next != NULL - && c->ext.actual->next->expr->rank != 0) - new_sym->formal->next->next->sym->ts.kind = - c->ext.actual->next->next->expr->ts.kind; - /* for error reporting, say it's declared where the original was */ new_sym->declared_at = sym->declared_at; } |