diff options
author | Christopher D. Rickett <crickett@lanl.gov> | 2007-10-15 19:58:55 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-10-15 21:58:55 +0200 |
commit | 9fd25b5cd5a8ed9de3ce735c041fe970059551a7 (patch) | |
tree | 36b79ca0ae8909cbb87feeea48f42fdad9417077 /libgfortran/intrinsics | |
parent | 93f238cea15b50c7e069c8b909102bb5b5202e6f (diff) | |
download | gcc-9fd25b5cd5a8ed9de3ce735c041fe970059551a7.tar.gz |
re PR fortran/32600 ([ISO Bind C] C_F_POINTER w/o SHAPE should not be a library function)
2007-10-15 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32600
* trans-expr.c (gfc_conv_function_call): Generate code to inline
c_associated.
* symbol.c (get_iso_c_sym): Preserve from_intmod and
* intmod_sym_id
attributes in the resolved symbol.
* resolve.c (gfc_iso_c_sub_interface): Remove dead code.
2007-10-15 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32600
* libgfortran/intrinsics/iso_c_binding.c: Remove c_associated_1
and c_associated_2.
* libgfortran/intrinsics/iso_c_binding.h: Ditto.
* libgfortran/gfortran.map: Ditto.
From-SVN: r129367
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r-- | libgfortran/intrinsics/iso_c_binding.c | 39 | ||||
-rw-r--r-- | libgfortran/intrinsics/iso_c_binding.h | 3 |
2 files changed, 0 insertions, 42 deletions
diff --git a/libgfortran/intrinsics/iso_c_binding.c b/libgfortran/intrinsics/iso_c_binding.c index 5d566bcf11b..2a1e994d4d9 100644 --- a/libgfortran/intrinsics/iso_c_binding.c +++ b/libgfortran/intrinsics/iso_c_binding.c @@ -193,42 +193,3 @@ ISO_C_BINDING_PREFIX (c_f_procpointer) (void *c_ptr_in, } -/* Test if the given c_ptr is associated or not. This function is - called if the user only supplied one c_ptr parameter to the - c_associated function. The second argument is optional, and the - Fortran compiler will resolve the function to this version if only - one arg was given. Associated here simply means whether or not the - c_ptr is NULL or not. */ - -GFC_LOGICAL_4 -ISO_C_BINDING_PREFIX (c_associated_1) (void *c_ptr_in_1) -{ - if (c_ptr_in_1 != NULL) - return 1; - else - return 0; -} - - -/* Test if the two c_ptr arguments are associated with one another. - This version of the c_associated function is called if the user - supplied two c_ptr args in the Fortran source. According to the - draft standard (J3/04-007), if c_ptr_in_1 is NULL, the two pointers - are NOT associated. If c_ptr_in_1 is non-NULL and it is not equal - to c_ptr_in_2, then either c_ptr_in_2 is NULL or is associated with - another address; either way, the two pointers are not associated - with each other then. */ - -GFC_LOGICAL_4 -ISO_C_BINDING_PREFIX (c_associated_2) (void *c_ptr_in_1, void *c_ptr_in_2) -{ - /* Since we have the second arg, if it doesn't equal the first, - return false; true otherwise. However, if the first one is null, - then return false; otherwise compare the two ptrs for equality. */ - if (c_ptr_in_1 == NULL) - return 0; - else if (c_ptr_in_1 != c_ptr_in_2) - return 0; - else - return 1; -} diff --git a/libgfortran/intrinsics/iso_c_binding.h b/libgfortran/intrinsics/iso_c_binding.h index 206359ad8c9..4679c2aba02 100644 --- a/libgfortran/intrinsics/iso_c_binding.h +++ b/libgfortran/intrinsics/iso_c_binding.h @@ -56,9 +56,6 @@ void ISO_C_BINDING_PREFIX(c_f_pointer)(void *, gfc_array_void *, implemented. */ void ISO_C_BINDING_PREFIX(c_f_procpointer) (void *, gfc_array_void *); -GFC_LOGICAL_4 ISO_C_BINDING_PREFIX(c_associated_1) (void *); -GFC_LOGICAL_4 ISO_C_BINDING_PREFIX(c_associated_2) (void *, void *); - void ISO_C_BINDING_PREFIX(c_f_pointer_u0) (void *, gfc_array_void *, const array_t *); void ISO_C_BINDING_PREFIX(c_f_pointer_d0) (void *, gfc_array_void *, |